File tree Expand file tree Collapse file tree 4 files changed +6
-9
lines changed
tests/syntax_tests/data/ppx/react/expected Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ let async_component ~async expr =
5353 if async then
5454 let open Ast_helper in
5555 Exp. apply
56- (Exp. ident
57- {loc = Location. none; txt = Ldot (Lident " Jsx" , " asyncComponent" )})
56+ (Exp. ident {loc = Location. none; txt = Ldot (Lident " Jsx" , " promise" )})
5857 [(Nolabel , expr)]
5958 else expr
Original file line number Diff line number Diff line change @@ -30,13 +30,11 @@ type element
3030external float : float => element = "%identity"
3131external int : int => element = "%identity"
3232external string : string => element = "%identity"
33-
3433external array : array <element > => element = "%identity"
34+ external promise : promise <element > => element = "%identity"
3535
3636type componentLike <'props , 'return > = 'props => 'return
3737type component <'props > = componentLike <'props , element >
3838
3939/* this function exists to prepare for making `component` abstract */
4040external component : componentLike <'props , element > => component <'props > = "%identity"
41-
42- external asyncComponent : promise <element > => element = "%identity"
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ module C0 = {
99 ReactDOM.jsx("div", {children: ?ReactDOM.someElement({React.int(a)})})
1010 }
1111 let make = {
12- let \"AsyncAwait$C0" = (props: props<_>) => Jsx.asyncComponent (make(props))
12+ let \"AsyncAwait$C0" = (props: props<_>) => Jsx.promise (make(props))
1313
1414 \"AsyncAwait$C0"
1515 }
@@ -26,7 +26,7 @@ module C1 = {
2626 }
2727 }
2828 let make = {
29- let \"AsyncAwait$C1" = (props: props<_>) => Jsx.asyncComponent (make(props))
29+ let \"AsyncAwait$C1" = (props: props<_>) => Jsx.promise (make(props))
3030
3131 \"AsyncAwait$C1"
3232 }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ module V4A5 = {
4545 ReactDOM.jsx("div", {children: ?ReactDOM.someElement({React.int(a)})})
4646 }
4747 let make = {
48- let \"SharedPropsWithProps$V4A5" = (props: props<_>) => Jsx.asyncComponent (make(props))
48+ let \"SharedPropsWithProps$V4A5" = (props: props<_>) => Jsx.promise (make(props))
4949 \"SharedPropsWithProps$V4A5"
5050 }
5151}
@@ -59,7 +59,7 @@ module V4A6 = {
5959 }
6060 }
6161 let make = {
62- let \"SharedPropsWithProps$V4A6" = (props: props<_>) => Jsx.asyncComponent (make(props))
62+ let \"SharedPropsWithProps$V4A6" = (props: props<_>) => Jsx.promise (make(props))
6363 \"SharedPropsWithProps$V4A6"
6464 }
6565}
You can’t perform that action at this time.
0 commit comments