mirror of https://github.com/vector-im/riot-web
Fix signature of sleep utility
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
111d4adab2
commit
97711032d8
|
@ -15,7 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Returns a promise which resolves with a given value after the given number of ms
|
// 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); }));
|
return new Promise((resolve => { setTimeout(resolve, ms, value); }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue