Skip to content

Commit fd11bf4

Browse files
committed
Example failure of jsx completion when the component is declared external.
See #307
1 parent 8d0412a commit fd11bf4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

analysis/tests/src/Jsx.res

+10-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,13 @@ let y = 44
4242
//^com <M prop=%bs.raw("1") k
4343

4444
let _ = <Component />
45-
// ^def
45+
// ^def
46+
47+
module Ext = {
48+
@react.component @module("@material-ui/core")
49+
external make: (~align: string=?) => React.element = "Typography"
50+
}
51+
52+
let extMake = Ext.make
53+
54+
//^com <Ext al

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

+3
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,6 @@ Complete tests/src/Jsx.res 40:2
181181
Definition tests/src/Jsx.res 43:11
182182
{"uri": "Component.res", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}}
183183

184+
Complete tests/src/Jsx.res 52:2
185+
[]
186+

0 commit comments

Comments
 (0)