1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export declare class PromiseDelegate<T> {
|
9 | |
10 |
|
11 |
|
12 | constructor();
|
13 | /**
|
14 | * The promise wrapped by the delegate.
|
15 | */
|
16 | readonly promise: Promise<T>;
|
17 | /**
|
18 | * Resolve the wrapped promise with the given value.
|
19 | *
|
20 | * @param value - The value to use for resolving the promise.
|
21 | */
|
22 | resolve(value: T | PromiseLike<T>): void;
|
23 | /**
|
24 | * Reject the wrapped promise with the given value.
|
25 | *
|
26 | * @reason - The reason for rejecting the promise.
|
27 | */
|
28 | reject(reason: unknown): void;
|
29 | private _resolve;
|
30 | private _reject;
|
31 | }
|