Fix signature of sleep utility

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-07-02 22:38:21 +01:00
parent 111d4adab2
commit 97711032d8
1 changed files with 1 additions and 1 deletions

View File

@ -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); }));
}