File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1001,6 +1001,7 @@ namespace ts.Completions {
1001
1001
if ( ( jsxContainer . kind === SyntaxKind . JsxSelfClosingElement ) || ( jsxContainer . kind === SyntaxKind . JsxOpeningElement ) ) {
1002
1002
// Cursor is inside a JSX self-closing element or opening element
1003
1003
attrsType = typeChecker . getJsxElementAttributesType ( < JsxOpeningLikeElement > jsxContainer ) ;
1004
+ isGlobalCompletion = false ;
1004
1005
1005
1006
if ( attrsType ) {
1006
1007
symbols = filterJsxAttributes ( typeChecker . getPropertiesOfType ( attrsType ) , ( < JsxOpeningLikeElement > jsxContainer ) . attributes ) ;
Original file line number Diff line number Diff line change 1
1
/// <reference path='fourslash.ts'/>
2
2
3
+ //@Filename : file.tsx
3
4
/////// <reference path="/*1*/..\services\services.ts" /> // no globals in reference paths
4
5
////import { /*2*/ } from "./file.ts"; // no globals in imports
5
6
////var test = "/*3*/"; // no globals in strings
20
21
//// /*9*/ // insert globals
21
22
//// }
22
23
/////*10*/ // insert globals
24
+ ////const y = <div /*11*/ />;
23
25
goTo . marker ( "1" ) ;
24
26
verify . completionListIsGlobal ( false ) ;
25
27
goTo . marker ( "2" ) ;
@@ -40,3 +42,5 @@ goTo.marker("9");
40
42
verify . completionListIsGlobal ( true ) ;
41
43
goTo . marker ( "10" ) ;
42
44
verify . completionListIsGlobal ( true ) ;
45
+ goTo . marker ( "11" ) ;
46
+ verify . completionListIsGlobal ( false ) ;
You can’t perform that action at this time.
0 commit comments