Skip to content

Add test case for intrinsic elements #923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2024
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
10 changes: 10 additions & 0 deletions analysis/tests/src/CompletionJsx.res
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ module CompWithoutJsxPpx = {

// <h1 hidd
// ^com

module IntrinsicElementLowercase = {
type props = {name?: string, age?: int}

@module("react")
external make: (@as("mesh") _, props) => Jsx.element = "createElement"
}

// <IntrinsicElementLowercase
// ^com
27 changes: 27 additions & 0 deletions analysis/tests/src/expected/CompletionJsx.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,30 @@ Path PervasivesU.JsxDOM.domProps
"documentation": null
}]

Complete src/CompletionJsx.res 61:30
posCursor:[61:30] posNoWhite:[61:28] Found expr:[61:4->61:29]
JSX <IntrinsicElementLowercase:[61:4->61:29] > _children:None
Completable: Cjsx([IntrinsicElementLowercase], "", [])
Package opens Pervasives.JsxModules.place holder
Resolved opens 1 pervasives
Path IntrinsicElementLowercase.make
[{
"label": "name",
"kind": 4,
"tags": [],
"detail": "option<string>",
"documentation": null
}, {
"label": "age",
"kind": 4,
"tags": [],
"detail": "option<int>",
"documentation": null
}, {
"label": "key",
"kind": 4,
"tags": [],
"detail": "string",
"documentation": null
}]