You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
387 B

2 months ago
/**
* A `Promise.withResolvers` implementation that exposes the `resolve` and
* `reject` functions on a `Promise`.
*
* @see https://tc39.es/proposal-promise-with-resolvers/
*/
export declare class DetachedPromise<T = any> {
readonly resolve: (value: T | PromiseLike<T>) => void;
readonly reject: (reason: any) => void;
readonly promise: Promise<T>;
constructor();
}