Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit d85ef30

Browse files
committed
add test
1 parent 1c185ed commit d85ef30

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

tests/ppx/react/expected/newtype.res.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ type props<'a, 'b, 'c> = {
55
b: 'b,
66
c: 'c,
77
}
8-
let make = ({ref}: props<'a, 'b, 'c>) => {
9-
let _ = ref
10-
(type a, ~a: a, ~b: array<option<[#Foo(a)]>>, ~c: 'a, _) =>
11-
ReactDOMRe.createDOMElementVariadic("div", [])
12-
}
8+
let make = (@react.component type a, ~a: a, ~b: array<option<[#Foo(a)]>>, ~c: 'a, _) =>
9+
ReactDOMRe.createDOMElementVariadic("div", [])
1310
let make = {
1411
let \"Newtype" = (props: props<_>) => make(props)
1512
\"Newtype"

tests/ppx/react/expected/typeConstraint.res.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ type props<'a, 'b> = {
44
a: 'a,
55
b: 'b,
66
}
7-
let make: 'a. (~a: 'a, ~b: 'a, 'a) => React.element = ({ref}: props<'a, 'b>) => {
8-
let _ = ref
9-
(type a): ((~a: a, ~b: a, a) => React.element) =>
10-
(~a, ~b, _) => ReactDOMRe.createDOMElementVariadic("div", [])
11-
}
7+
let make = (@react.component type a): ((~a: a, ~b: a, a) => React.element) =>
8+
(~a, ~b, _) => ReactDOMRe.createDOMElementVariadic("div", [])
129
let make = {
1310
let \"TypeConstraint" = (props: props<_>) => make(props)
1411
\"TypeConstraint"

0 commit comments

Comments
 (0)