File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 19
19
// let _ = <div onMouseEnter= />
20
20
// ^com
21
21
22
+ // Should wrap in {}
23
+ // let _ = <CompletionSupport.TestComponent testArr=
24
+ // ^com
25
+
26
+ // Should not wrap in {}
27
+ // let _ = <CompletionSupport.TestComponent testArr={[]}
28
+ // ^com
29
+
Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ module TestComponent = {
12
12
let make = (
13
13
~on : bool ,
14
14
~test : testVariant ,
15
+ ~testArr : array <testVariant >,
15
16
~polyArg : option <[#one | #two | #two2 | #three (int , bool )]>= ?,
16
17
) => {
17
18
ignore (on )
18
19
ignore (test )
20
+ ignore (testArr )
19
21
ignore (polyArg )
20
22
React .null
21
23
}
Original file line number Diff line number Diff line change @@ -165,3 +165,48 @@ Completable: Cexpression CJsxPropValue [div] onMouseEnter
165
165
"insertTextFormat": 2
166
166
}]
167
167
168
+ Complete src/CompletionJsxProps.res 22:52
169
+ posCursor:[22:52] posNoWhite:[22:51] Found expr:[22:12->22:52]
170
+ JSX <CompletionSupport.TestComponent:[22:12->22:43] testArr[22:44->22:51]=...__ghost__[0:-1->0:-1]> _children:None
171
+ Completable: Cexpression CJsxPropValue [CompletionSupport, TestComponent] testArr
172
+ [{
173
+ "label": "[]",
174
+ "kind": 12,
175
+ "tags": [],
176
+ "detail": "type testVariant = One | Two | Three(int)",
177
+ "documentation": null,
178
+ "sortText": "A",
179
+ "insertText": "{[$0]}",
180
+ "insertTextFormat": 2
181
+ }]
182
+
183
+ Complete src/CompletionJsxProps.res 26:54
184
+ posCursor:[26:54] posNoWhite:[26:53] Found expr:[26:12->26:56]
185
+ JSX <CompletionSupport.TestComponent:[26:12->26:43] testArr[26:44->26:51]=...[26:53->26:55]> _children:None
186
+ Completable: Cexpression CJsxPropValue [CompletionSupport, TestComponent] testArr->array
187
+ [{
188
+ "label": "One",
189
+ "kind": 4,
190
+ "tags": [],
191
+ "detail": "One\n\ntype testVariant = One | Two | Three(int)",
192
+ "documentation": null,
193
+ "insertText": "{One}",
194
+ "insertTextFormat": 2
195
+ }, {
196
+ "label": "Two",
197
+ "kind": 4,
198
+ "tags": [],
199
+ "detail": "Two\n\ntype testVariant = One | Two | Three(int)",
200
+ "documentation": null,
201
+ "insertText": "{Two}",
202
+ "insertTextFormat": 2
203
+ }, {
204
+ "label": "Three(_)",
205
+ "kind": 4,
206
+ "tags": [],
207
+ "detail": "Three(int)\n\ntype testVariant = One | Two | Three(int)",
208
+ "documentation": null,
209
+ "insertText": "{Three(${1:_})}",
210
+ "insertTextFormat": 2
211
+ }]
212
+
You can’t perform that action at this time.
0 commit comments