File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -3549,6 +3549,9 @@ namespace ts {
3549
3549
if ( parent && ( parent . kind === SyntaxKind . JsxSelfClosingElement || parent . kind === SyntaxKind . JsxOpeningElement ) ) {
3550
3550
return < JsxOpeningLikeElement > parent ;
3551
3551
}
3552
+ else if ( parent . kind === SyntaxKind . JsxAttribute ) {
3553
+ return < JsxOpeningLikeElement > parent . parent ;
3554
+ }
3552
3555
break ;
3553
3556
3554
3557
// The context token is the closing } or " of an attribute, which means
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ //@Filename : file.tsx
4
+ //// declare module JSX {
5
+ //// interface Element { }
6
+ //// interface IntrinsicElements {
7
+ //// div: { ONE: string; TWO: number; }
8
+ //// }
9
+ //// }
10
+ //// var x = <div /*1*/ autoComplete /*2*/ />;
11
+
12
+
13
+ goTo . marker ( '1' ) ;
14
+ verify . completionListContains ( "ONE" ) ;
15
+ verify . not . completionListAllowsNewIdentifier ( ) ;
16
+
17
+ goTo . marker ( '2' ) ;
18
+ verify . completionListContains ( "ONE" ) ;
19
+ verify . not . completionListAllowsNewIdentifier ( ) ;
You can’t perform that action at this time.
0 commit comments