Skip to content

Commit 7db9012

Browse files
committed
add base test case for completing jsx prop and labelled argument
1 parent 0d2249c commit 7db9012

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
type someVariant = One | Two | Three | Four
2+
3+
let someVariantToString = (~someVariant) =>
4+
switch someVariant {
5+
| One => "One"
6+
| Two => "Two"
7+
| Three => "Three"
8+
| Four => "Four"
9+
}
10+
11+
// let someVariantToString(~someVariant=
12+
// ^com
13+
14+
module SomeComponent = {
15+
@react.component
16+
let make = (~whatever) => {
17+
someVariantToString(~someVariant=whatever)->React.string
18+
}
19+
}
20+
21+
// let jsx = <SomeComponent whatever=
22+
// ^com
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Complete src/TypeContextCompletion.res 10:40
2+
posCursor:[10:40] posNoWhite:[10:39] Found expr:[10:26->18:1]
3+
[]
4+
5+
Complete src/TypeContextCompletion.res 20:37
6+
posCursor:[20:37] posNoWhite:[20:36] Found expr:[20:14->20:37]
7+
JSX <SomeComponent:[20:14->20:27] whatever[20:28->20:36]=...__ghost__[0:-1->0:-1]> _children:None
8+
[]
9+

0 commit comments

Comments
 (0)