@@ -978,25 +978,25 @@ and getCompletionsForContextPath ~full ~opens ~rawOpens ~allFiles ~pos ~env
978
978
in
979
979
let targetLabel =
980
980
if lowercaseComponent then
981
- let rec digToTypeForCompletion path ~ env =
981
+ let rec digToTypeForCompletion path =
982
982
match
983
983
path
984
984
|> getCompletionsForPath ~completion Context:Type ~exact: true
985
985
~package ~opens ~all Files ~pos ~env ~scope
986
986
with
987
- | {kind = Type {kind = Abstract (Some (p , _ ))} ; env } :: _ ->
987
+ | {kind = Type {kind = Abstract (Some (p , _ ))} } :: _ ->
988
988
(* This case happens when what we're looking for is a type alias.
989
989
This is the case in newer rescript-react versions where
990
990
ReactDOM.domProps is an alias for JsxEvent.t. *)
991
991
let pathRev = p |> Utils. expandPath in
992
- pathRev |> List. rev |> digToTypeForCompletion ~env
993
- | {kind = Type {kind = Record fields } ; env } :: _ -> (
992
+ pathRev |> List. rev |> digToTypeForCompletion
993
+ | {kind = Type {kind = Record fields } } :: _ -> (
994
994
match fields |> List. find_opt (fun f -> f.fname.txt = propName) with
995
995
| None -> None
996
996
| Some f -> Some (f.fname.txt, f.typ, env))
997
997
| _ -> None
998
998
in
999
- [" ReactDOM" ; " domProps" ] |> digToTypeForCompletion ~env
999
+ [" ReactDOM" ; " domProps" ] |> digToTypeForCompletion
1000
1000
else
1001
1001
CompletionJsx. getJsxLabels ~component Path:pathToComponent
1002
1002
~find TypeOfValue ~package
0 commit comments