diff options
Diffstat (limited to 'node_modules/@calebboyd/semaphore/deferred.d.ts')
-rw-r--r-- | node_modules/@calebboyd/semaphore/deferred.d.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/node_modules/@calebboyd/semaphore/deferred.d.ts b/node_modules/@calebboyd/semaphore/deferred.d.ts new file mode 100644 index 0000000..cbc1ada --- /dev/null +++ b/node_modules/@calebboyd/semaphore/deferred.d.ts @@ -0,0 +1,8 @@ +export declare function createDeferredFactory(PromiseCtor?: PromiseConstructor): <T>() => Deferred<T>; +export declare const createDeferred: <T>() => Deferred<T>; +export interface Deferred<T> { + value: T; + promise: Promise<T>; + resolve(value?: T | undefined | PromiseLike<T>): void; + reject(reason: any): void; +} |