Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions analysis/tests/src/DotCompletionEverywhere.res
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,22 @@ let arr = [1, 2, 3]

// arr.m
// ^com

module DOMAPI = {
type htmlElement = {prefix: string }

@editor.completeFrom(HTMLButtonElement)
type rec htmlButtonElement = {mutable disabled: bool}
}

module HTMLButtonElement = {
open DOMAPI

@send
external checkValidity: htmlButtonElement => bool = "checkValidity"
}

let button: DOMAPI.htmlButtonElement = %todo

// button.
// ^com
20 changes: 20 additions & 0 deletions analysis/tests/src/expected/DotCompletionEverywhere.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,23 @@ Path Js.Array2.m
}
}]

Complete src/DotCompletionEverywhere.res 85:10
posCursor:[85:10] posNoWhite:[85:9] Found expr:[85:3->85:10]
Pexp_field [85:3->85:9] _:[88:0->85:10]
Completable: Cpath Value[button].""
Package opens Pervasives.JsxModules.place holder
Resolved opens 1 pervasives
ContextPath Value[button].""
ContextPath Value[button]
Path button
CPPipe pathFromEnv:DOMAPI found:true
Path DOMAPI.
Path HTMLButtonElement.
[{
"label": "disabled",
"kind": 5,
"tags": [],
"detail": "bool",
"documentation": {"kind": "markdown", "value": "```rescript\ndisabled: bool\n```\n\n```rescript\ntype htmlButtonElement = {mutable disabled: bool}\n```"}
}]