File tree Expand file tree Collapse file tree 3 files changed +117
-175
lines changed Expand file tree Collapse file tree 3 files changed +117
-175
lines changed Original file line number Diff line number Diff line change @@ -1618,18 +1618,7 @@ let rec getCompletionsForContextPath ~full ~opens ~rawOpens ~allFiles ~pos ~env
1618
1618
| true , Some (Path. Pident id ) when Ident. name id = " string" ->
1619
1619
Some " string"
1620
1620
| true , Some (Path. Pident id ) when Ident. name id = " array" ->
1621
- (* Make sure the array contains React.element *)
1622
- let isReactElementArray =
1623
- match typ |> extractType ~env ~package with
1624
- | Some (Tarray (_env , payload )) -> (
1625
- match
1626
- payload |> getTypePath |> Option. map pathIdentToString
1627
- with
1628
- | Some "React.element" -> true
1629
- | _ -> false )
1630
- | _ -> false
1631
- in
1632
- if isReactElementArray then Some " array" else None
1621
+ Some " array"
1633
1622
| _ -> None
1634
1623
in
1635
1624
match forJsxCompletion with
Original file line number Diff line number Diff line change @@ -9,10 +9,8 @@ module SomeComponent = {
9
9
let make = (~someProp ) => {
10
10
let someInt = 12
11
11
let someArr = [React .null ]
12
- let someInvalidArr = [12 ]
13
12
ignore (someInt )
14
13
ignore (someArr )
15
- ignore (someInvalidArr )
16
14
// someString->st
17
15
// ^com
18
16
<div >
@@ -30,8 +28,6 @@ module SomeComponent = {
30
28
// ^com
31
29
// {someArr->a}
32
30
// ^com
33
- // {someInvalidArr->a}
34
- // ^com
35
31
</div >
36
32
}
37
33
}
You can’t perform that action at this time.
0 commit comments