Fix signature of sleep utility
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
111d4adab2
commit
97711032d8
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// Returns a promise which resolves with a given value after the given number of ms
|
||||
export function sleep<T>(ms: number, value: T): Promise<T> {
|
||||
export function sleep<T>(ms: number, value?: T): Promise<T> {
|
||||
return new Promise((resolve => { setTimeout(resolve, ms, value); }));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue