UNPKG
computed-async-mobx
Version:
alpha (7.0.0)
beta (7.0.1-beta.1)
latest (6.1.0)
7.0.1-beta.1
7.0.0
6.1.0
6.0.0
4.2.1
4.2.0
4.1.1
4.1.0
4.0.1
4.0.0
3.2.0
3.1.0
3.0.0
2.0.0
1.2.0
1.1.0
1.0.0
0.2.0
0.1.1
Define a computed by returning a Promise
computed-async-mobx
/
test
/
delay.ts
4 lines
(3 loc)
•
119 B
text/typescript
View Raw
1
2
3
4
export
function
delay
(
ms: number
):
Promise
<
void
> {
return
new
Promise
<
void
>(
resolve
=>
setTimeout
(resolve, ms)); }