aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@calebboyd/semaphore/deferred.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@calebboyd/semaphore/deferred.d.ts')
-rw-r--r--node_modules/@calebboyd/semaphore/deferred.d.ts8
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;
+}