0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

remove dead code (#1796)

This commit is contained in:
Yoshiya Hinosawa 2019-02-17 10:07:44 +09:00 committed by Ryan Dahl
parent a8ebb8f05a
commit 9fb9048c73
2 changed files with 0 additions and 26 deletions

View file

@ -64,6 +64,3 @@ export { Console, stringifyArgs } from "./console";
// TODO Don't expose DomIterableMixin.
/** @internal */
export { DomIterableMixin } from "./mixins/dom_iterable";
// TODO Don't expose deferred.
/** @internal */
export { deferred } from "./util";

View file

@ -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 {