forked from duckduckgo/tracker-radar-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cancel timer on rejection in wait.js
- Loading branch information
Showing
3 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
export = wait; | ||
/** | ||
* @param {Promise<any>} promise | ||
* @template T | ||
* @param {Promise<T>} promise | ||
* @param {number} maxMs max running time, 0 to disable timeout | ||
* @returns {Promise<any>} | ||
* @returns {Promise<T>} | ||
*/ | ||
declare function wait(promise: Promise<any>, maxMs: number): Promise<any>; | ||
declare function wait<T>(promise: Promise<T>, maxMs: number): Promise<T>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters