3 lines
140 B
TypeScript
Raw Normal View History

2018-04-02 05:34:16 +00:00
export function delay<T>(millis: number, value?: T): Promise<T> {
return new Promise(resolve => setTimeout(() => resolve(value), millis))
}