Skip to content

Commit 5db37ee

Browse files
committed
Add example where create interface file does not work with V4
See #617
1 parent d77e001 commit 5db37ee

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

analysis/tests/src/JsxV4.res

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@ let _ = <M4 first="abc" />
1515
let _ = <M4 first="abc" />
1616
// ^hov
1717

18-
1918
module MM = {
2019
@react.component
2120
let make = () => React.null
2221
}
22+
23+
module Other = {
24+
@react.component
25+
let make = (~name) => React.string(name)
26+
}
27+
28+
// ^int

analysis/tests/src/expected/JsxV4.res.txt

+14
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,17 @@ Completable: Cjsx([M4], f, [first, f])
1616
Hover src/JsxV4.res 14:9
1717
{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<M4.props<string, string, string>>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype M4.props<'first, 'fun, 'second> = {\n first: 'first,\n fun?: 'fun,\n second?: 'second,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxV4.res%22%2C3%2C2%5D)\n\n\n Doc Comment For M4 "}}
1818

19+
Create Interface src/JsxV4.res
20+
module M4: {
21+
@react.component
22+
let make: (~first: string, ~fun: string=?, ~second: string=?) => React.element
23+
}
24+
module MM: {
25+
@react.component
26+
let make: unit => React.element
27+
}
28+
module Other: {
29+
type props<'name> = {name: 'name}
30+
let make: props<string> => React.element
31+
}
32+

0 commit comments

Comments
 (0)