Skip to content

Commit 603b8d9

Browse files
committed
refactor
1 parent 380e8a9 commit 603b8d9

File tree

5 files changed

+127
-438
lines changed

5 files changed

+127
-438
lines changed

analysis/src/TypeUtils.ml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1183,8 +1183,7 @@ let transformCompletionToPipeCompletion ?(synthetic = false) ~env ?posOfDot
11831183
of the project. Example: type x in module SomeModule in file SomeFile would get the globally
11841184
unique id `SomeFile.SomeModule.x`.*)
11851185
let rec findRootTypeId ~full ~env (t : Types.type_expr) =
1186-
let debug = Debug.verbose () in
1187-
(* let debug = false in *)
1186+
let debug = false in
11881187
match t.desc with
11891188
| Tlink t1 | Tsubst t1 | Tpoly (t1, []) -> findRootTypeId ~full ~env t1
11901189
| Tconstr (Pident {name = "function$"}, [t; _], _) ->

analysis/tests/src/DotCompletionEverywhere.res

-87
This file was deleted.

analysis/tests/src/DotPipeCompletionSpec.res

+30
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,33 @@ let outOfScope = (t: typeOutsideModule) => t
114114

115115
// @editor.completeFrom([CompletionPipe, Dot]) type t
116116
// ^com
117+
118+
let someObj = {
119+
"name": "hello",
120+
"age": 123,
121+
}
122+
123+
// someObj.
124+
// ^com
125+
126+
// someObj.na
127+
// ^com
128+
129+
module DOMAPI = {
130+
type htmlElement = {prefix: string}
131+
132+
@editor.completeFrom(DotPipeCompletionSpec.HTMLButtonElement)
133+
type rec htmlButtonElement = {mutable disabled: bool}
134+
}
135+
136+
module HTMLButtonElement = {
137+
open DOMAPI
138+
139+
@send
140+
external checkValidity: htmlButtonElement => bool = "checkValidity"
141+
}
142+
143+
external button: DOMAPI.htmlButtonElement = "button"
144+
145+
// button.
146+
// ^com

0 commit comments

Comments
 (0)