diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-02-17 10:07:44 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-16 20:07:44 -0500 |
commit | 9fb9048c737bbc5eb4dfa42a506bfc978316ac10 (patch) | |
tree | 1066734bd76b876ba2f6478cd2f9279d40665639 /js/util.ts | |
parent | a8ebb8f05a061422049363d8bed3e8e4d14d540e (diff) |
remove dead code (#1796)
Diffstat (limited to 'js/util.ts')
-rw-r--r-- | js/util.ts | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/js/util.ts b/js/util.ts index 542356da0..6f8c72f50 100644 --- a/js/util.ts +++ b/js/util.ts @@ -107,29 +107,6 @@ export function containsOnlyASCII(str: string): boolean { return /^[\x00-\x7F]*$/.test(str); } -export interface Deferred { - promise: Promise<void>; - resolve: Function; - reject: Function; -} - -/** Create a wrapper around a promise that could be resolved externally. - * TODO Do not expose this from "deno" namespace. - */ -export function deferred(): Deferred { - let resolve: Function | undefined; - let reject: Function | undefined; - const promise = new Promise<void>((res, rej) => { - resolve = res; - reject = rej; - }); - return { - promise, - resolve: resolve!, - reject: reject! - }; -} - // tslint:disable-next-line:variable-name const TypedArrayConstructor = Object.getPrototypeOf(Uint8Array); export function isTypedArray(x: unknown): x is TypedArray { |