aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@calebboyd/semaphore/deferred.d.ts
blob: cbc1ada24d3be66e88d267a9718ef1b73337b59e (plain)
1
2
3
4
5
6
7
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;
}