diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-11-24 09:31:10 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-24 09:31:10 +1100 |
commit | 276f5297556097461e0b63f2b958d825c1c857ab (patch) | |
tree | c4146607a4646968d03ef804ec573133b2547553 /cli/tests/workers_test.ts | |
parent | 266925d772527c9ba5fbc094e67cade31fc35a47 (diff) |
feat(cli): update to TypeScript 4.1 (#7573)
Diffstat (limited to 'cli/tests/workers_test.ts')
-rw-r--r-- | cli/tests/workers_test.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tests/workers_test.ts b/cli/tests/workers_test.ts index 7cff6848b..c74680c27 100644 --- a/cli/tests/workers_test.ts +++ b/cli/tests/workers_test.ts @@ -10,14 +10,14 @@ import { assert, assertEquals } from "../../std/testing/asserts.ts"; export interface ResolvableMethods<T> { - resolve: (value?: T | PromiseLike<T>) => void; + resolve: (value: T | PromiseLike<T>) => void; // deno-lint-ignore no-explicit-any reject: (reason?: any) => void; } export type Resolvable<T> = Promise<T> & ResolvableMethods<T>; -export function createResolvable<T>(): Resolvable<T> { +export function createResolvable<T = void>(): Resolvable<T> { let methods: ResolvableMethods<T>; const promise = new Promise<T>((resolve, reject): void => { methods = { resolve, reject }; |