Skip to content

Commit 6ef2769

Browse files
committed
add tests
1 parent ba5d030 commit 6ef2769

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
let f = a => Js.Promise.resolve(a + a)
2+
3+
@react.component
4+
let make = async (~a) => {
5+
let a = await f(a)
6+
<div> {React.int(a)} </div>
7+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
let f = a => Js.Promise.resolve(a + a)
2+
type props<'a> = {a: 'a}
3+
4+
let make = ({a, _}: props<_>) => {
5+
let a = await f(a)
6+
ReactDOM.jsx("div", {children: ?ReactDOM.someElement({React.int(a)})})
7+
}
8+
let make = {
9+
let \"AsyncAwait" = (props: props<_>) => make(props)
10+
11+
\"AsyncAwait"
12+
}

0 commit comments

Comments
 (0)