mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 18:43:21 +08:00
15 lines
441 B
TypeScript
15 lines
441 B
TypeScript
// Type definitions for p-defer 1.0
|
|
// Project: https://github.com/sindresorhus/p-defer
|
|
// Definitions by: Sam Verschueren <https://github.com/SamVerschueren>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
interface DeferredPromise<T> {
|
|
resolve<U>(value: U | PromiseLike<U>): Promise<U>;
|
|
reject(reason: any): Promise<never>;
|
|
promise: Promise<T>;
|
|
}
|
|
|
|
declare function pDefer<T>(): DeferredPromise<T>;
|
|
|
|
export = pDefer;
|