11/// <reference path='fourslash.ts'/>
22
3+ // @Filename : file.ts
4+ ////export var x = 10;
5+ ////export var y = 10;
6+ ////export default class C {
7+ //// }
8+
9+ // @Filename : a.ts
10+ ////import { /*1*/ } from "./file.ts"; // no globals in imports - export found
11+
312//@Filename : file.tsx
4- /////// <reference path="/*1 */..\services\services.ts" /> // no globals in reference paths
5- ////import { /*2 */ } from "./file .ts"; // no globals in imports
6- ////var test = "/*3 */"; // no globals in strings
7- /////*4 */class A { // insert globals
13+ /////// <reference path="/*2 */..\services\services.ts" /> // no globals in reference paths
14+ ////import { /*3 */ } from "./file1 .ts"; // no globals in imports - export not found
15+ ////var test = "/*4 */"; // no globals in strings
16+ /////*5 */class A { // insert globals
817//// foo(): string { return ''; }
918//// }
1019////
11- ////class /*5 */B extends A { // no globals after class keyword
20+ ////class /*6 */B extends A { // no globals after class keyword
1221//// bar(): string {
13- //// /*6 */ // insert globals
22+ //// /*7 */ // insert globals
1423//// return '';
1524//// }
1625//// }
1726////
18- ////class C</*7 */ U extends A, T extends A> { // no globals at beginning of generics
27+ ////class C</*8 */ U extends A, T extends A> { // no globals at beginning of generics
1928//// x: U;
20- //// y = this./*8 */x; // no globals inserted for member completions
21- //// /*9 */ // insert globals
29+ //// y = this./*9 */x; // no globals inserted for member completions
30+ //// /*10 */ // insert globals
2231//// }
23- /////*10*/ // insert globals
24- ////const y = <div /*11*/ />;
32+ /////*11*/ // insert globals
33+ ////const y = <div /*12*/ />; // no globals in jsx attribute found
34+ ////const z = <div =/*13*/ />; // no globals in jsx attribute with syntax error
35+ ////const x = `/*14*/ ${/*15*/}`; // globals only in template expression
2536goTo . marker ( "1" ) ;
2637verify . completionListIsGlobal ( false ) ;
2738goTo . marker ( "2" ) ;
2839verify . completionListIsGlobal ( false ) ;
2940goTo . marker ( "3" ) ;
3041verify . completionListIsGlobal ( false ) ;
3142goTo . marker ( "4" ) ;
32- verify . completionListIsGlobal ( true ) ;
33- goTo . marker ( "5" ) ;
3443verify . completionListIsGlobal ( false ) ;
35- goTo . marker ( "6 " ) ;
44+ goTo . marker ( "5 " ) ;
3645verify . completionListIsGlobal ( true ) ;
37- goTo . marker ( "7 " ) ;
46+ goTo . marker ( "6 " ) ;
3847verify . completionListIsGlobal ( false ) ;
48+ goTo . marker ( "7" ) ;
49+ verify . completionListIsGlobal ( true ) ;
3950goTo . marker ( "8" ) ;
4051verify . completionListIsGlobal ( false ) ;
4152goTo . marker ( "9" ) ;
42- verify . completionListIsGlobal ( true ) ;
53+ verify . completionListIsGlobal ( false ) ;
4354goTo . marker ( "10" ) ;
4455verify . completionListIsGlobal ( true ) ;
4556goTo . marker ( "11" ) ;
57+ verify . completionListIsGlobal ( true ) ;
58+ goTo . marker ( "12" ) ;
59+ verify . completionListIsGlobal ( false ) ;
60+ goTo . marker ( "13" ) ;
61+ verify . completionListIsGlobal ( false ) ;
62+ goTo . marker ( "14" ) ;
4663verify . completionListIsGlobal ( false ) ;
64+ goTo . marker ( "15" ) ;
65+ verify . completionListIsGlobal ( true ) ;
0 commit comments