2014-08-30 03:02:05 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @Filename: externalModuleWithExportAssignment_file0.ts
|
|
|
|
////module m2 {
|
|
|
|
//// export interface connectModule {
|
|
|
|
//// (res, req, next): void;
|
|
|
|
//// }
|
|
|
|
//// export interface connectExport {
|
|
|
|
//// use: (mod: connectModule) => connectExport;
|
|
|
|
//// listen: (port: number) => void;
|
|
|
|
//// }
|
|
|
|
////}
|
|
|
|
////var m2: {
|
|
|
|
//// (): m2.connectExport;
|
|
|
|
//// test1: m2.connectModule;
|
|
|
|
//// test2(): m2.connectModule;
|
|
|
|
////};
|
|
|
|
////export = m2;
|
|
|
|
|
|
|
|
// @Filename: externalModuleWithExportAssignment_file1.ts
|
|
|
|
////import /*1*/a1 = require("externalModuleWithExportAssignment_file0");
|
|
|
|
////export var /*2*/a = a1;
|
|
|
|
////a./*3*/test1(/*4*/null, null, null);
|
|
|
|
////var /*6*/r1 = a.test2(/*5*/);
|
|
|
|
////var /*8*/r2 = a(/*7*/);
|
|
|
|
////a1./*9*/test1(/*10*/null, null, null);
|
|
|
|
////var /*12*/r3 = a1.test2(/*11*/);
|
|
|
|
////var /*14*/r4 = a1(/*13*/);
|
|
|
|
////var v1: a1./*15*/connectExport;
|
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.file("externalModuleWithExportAssignment_file1.ts");
|
|
|
|
goTo.marker('1');
|
2014-10-11 00:24:19 +02:00
|
|
|
verify.quickInfoIs('import a1 = require("externalModuleWithExportAssignment_file0")');
|
2014-08-30 03:02:05 +02:00
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.marker('2');
|
|
|
|
verify.quickInfoIs("(var) a: {\n (): a1.connectExport;\n test1: a1.connectModule;\n test2(): a1.connectModule;\n}", undefined);
|
2014-08-30 03:02:05 +02:00
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.marker('3');
|
|
|
|
verify.quickInfoIs("(property) test1: a1.connectModule(res: any, req: any, next: any) => void", undefined);
|
2014-10-23 21:35:04 +02:00
|
|
|
verify.completionListContains("test1", "(property) test1: a1.connectModule(res: any, req: any, next: any) => void", undefined);
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.completionListContains("test2", "(method) test2(): a1.connectModule", undefined);
|
|
|
|
verify.not.completionListContains("connectModule");
|
|
|
|
verify.not.completionListContains("connectExport");
|
2014-08-30 03:02:05 +02:00
|
|
|
|
|
|
|
goTo.marker('4');
|
|
|
|
verify.currentSignatureHelpIs("test1(res: any, req: any, next: any): void");
|
|
|
|
|
|
|
|
goTo.marker('5');
|
|
|
|
verify.currentSignatureHelpIs("test2(): a1.connectModule");
|
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.marker('6');
|
|
|
|
verify.quickInfoIs("(var) r1: a1.connectModule", undefined);
|
2014-08-30 03:02:05 +02:00
|
|
|
|
|
|
|
goTo.marker('7');
|
|
|
|
verify.currentSignatureHelpIs("a(): a1.connectExport");
|
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.marker('8');
|
|
|
|
verify.quickInfoIs("(var) r2: a1.connectExport", undefined);
|
2014-08-30 03:02:05 +02:00
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.marker('9');
|
|
|
|
verify.quickInfoIs("(property) test1: a1.connectModule(res: any, req: any, next: any) => void", undefined);
|
2014-10-23 21:35:04 +02:00
|
|
|
verify.completionListContains("test1", "(property) test1: a1.connectModule(res: any, req: any, next: any) => void", undefined);
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.completionListContains("test2", "(method) test2(): a1.connectModule", undefined);
|
2014-10-09 03:25:42 +02:00
|
|
|
verify.completionListContains("connectModule");
|
|
|
|
verify.completionListContains("connectExport");
|
2014-08-30 03:02:05 +02:00
|
|
|
|
|
|
|
goTo.marker('10');
|
|
|
|
verify.currentSignatureHelpIs("test1(res: any, req: any, next: any): void");
|
|
|
|
|
|
|
|
goTo.marker('11');
|
|
|
|
verify.currentSignatureHelpIs("test2(): a1.connectModule");
|
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.marker('12');
|
|
|
|
verify.quickInfoIs("(var) r3: a1.connectModule", undefined);
|
2014-08-30 03:02:05 +02:00
|
|
|
|
|
|
|
goTo.marker('13');
|
|
|
|
verify.currentSignatureHelpIs("a1(): a1.connectExport");
|
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.marker('14');
|
|
|
|
verify.quickInfoIs("(var) r4: a1.connectExport", undefined);
|
2014-08-30 03:02:05 +02:00
|
|
|
|
2014-10-07 20:30:27 +02:00
|
|
|
goTo.marker('15');
|
|
|
|
verify.not.completionListContains("test1", "(property) test1: a1.connectModule", undefined);
|
|
|
|
verify.not.completionListContains("test2", "(method) test2(): a1.connectModule", undefined);
|
2014-10-09 03:25:42 +02:00
|
|
|
verify.completionListContains("connectModule", "interface a1.connectModule", undefined);
|
|
|
|
verify.completionListContains("connectExport", "interface a1.connectExport", undefined);
|
2014-08-30 03:02:05 +02:00
|
|
|
|