1 |
|
2 |
|
3 |
|
4 | export declare class TimeoutError extends Error {
|
5 | constructor(message?: string);
|
6 | }
|
7 | /**
|
8 | * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise
|
9 | * rejects, and resolves if the specified promise resolves.
|
10 | *
|
11 | * <p> NOTE: this operation will continue even after it throws a {@link TimeoutError}.
|
12 | *
|
13 | * @param promise promise to use with timeout.
|
14 | * @param timeout the timeout in milliseconds until the returned promise is rejected.
|
15 | */
|
16 | export declare function callWithTimeout<T>(promise: Promise<T>, timeout: number): Promise<T>;
|
17 |
|
\ | No newline at end of file |