File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -1392,7 +1392,9 @@ function createCompletionEntry(
13921392 sortText = SortText . SortBelow ( sortText ) ;
13931393 }
13941394
1395- if ( isJsxIdentifierExpected && ! isRightOfOpenTag && preferences . includeCompletionsWithSnippetText && preferences . jsxAttributeCompletionStyle && preferences . jsxAttributeCompletionStyle !== "none" ) {
1395+ if ( isJsxIdentifierExpected && ! isRightOfOpenTag
1396+ && preferences . includeCompletionsWithSnippetText && preferences . jsxAttributeCompletionStyle
1397+ && preferences . jsxAttributeCompletionStyle !== "none" && ! ( isJsxAttribute ( location . parent ) && location . parent . initializer ) ) {
13961398 let useBraces = preferences . jsxAttributeCompletionStyle === "braces" ;
13971399 const type = typeChecker . getTypeOfSymbolAtLocation ( symbol , location ) ;
13981400
Original file line number Diff line number Diff line change 1+ /// <reference path="fourslash.ts" />
2+
3+ // @filename : /foo.tsx
4+ ////declare namespace JSX {
5+ //// interface Element { }
6+ //// interface IntrinsicElements {
7+ //// foo: {
8+ //// className: string;
9+ //// }
10+ //// }
11+ //// }
12+ ////<foo cl/**/={""} />
13+
14+ verify . completions ( {
15+ marker : "" ,
16+ includes : {
17+ name : "className" ,
18+ text : "(property) className: string" ,
19+ insertText : undefined ,
20+ isSnippet : undefined ,
21+ } ,
22+ preferences : {
23+ jsxAttributeCompletionStyle : "braces" ,
24+ includeCompletionsWithSnippetText : true ,
25+ includeCompletionsWithInsertText : true ,
26+ } ,
27+ } )
You can’t perform that action at this time.
0 commit comments