mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Modify fourslash tests
This commit is contained in:
parent
eecf7ba638
commit
8489e521c8
@ -1,7 +1,7 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////
|
||||
//// module /*check*/Mod{
|
||||
//// namespace /*check*/Mod{
|
||||
//// }
|
||||
////
|
||||
//// interface MyInterface {
|
||||
@ -11,10 +11,10 @@
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('check');
|
||||
verify.quickInfoIs('module Mod');
|
||||
verify.quickInfoIs('namespace Mod');
|
||||
|
||||
goTo.marker('insert');
|
||||
edit.insert("x: number;\n");
|
||||
|
||||
goTo.marker('check');
|
||||
verify.quickInfoIs('module Mod');
|
||||
verify.quickInfoIs('namespace Mod');
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class c/*1*/5b { public foo() { } }
|
||||
////module c/*2*/5b { export var y = 2; } // should be ok
|
||||
////namespace c/*2*/5b { export var y = 2; } // should be ok
|
||||
/////*3*/
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("class c5b\nmodule c5b");
|
||||
verify.quickInfoIs("class c5b\nnamespace c5b");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("class c5b\nmodule c5b");
|
||||
verify.quickInfoIs("class c5b\nnamespace c5b");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.completionListContains("c5b", "class c5b\nmodule c5b");
|
||||
verify.completionListContains("c5b", "class c5b\nnamespace c5b");
|
||||
@ -1,12 +1,12 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function /*11*/m2f(x: number) { };
|
||||
////module m2f { export interface I { foo(): void } }
|
||||
////namespace m2f { export interface I { foo(): void } }
|
||||
////var x: m2f./*1*/
|
||||
////var /*2*/r = m2f/*3*/;
|
||||
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs('function m2f(x: number): void\nmodule m2f');
|
||||
verify.quickInfoIs('function m2f(x: number): void\nnamespace m2f');
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('I');
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: commentsExternalModules_file0.ts
|
||||
/////** Module comment*/
|
||||
////export module m/*1*/1 {
|
||||
/////** Namespace comment*/
|
||||
////export namespace m/*1*/1 {
|
||||
//// /** b's comment*/
|
||||
//// export var b: number;
|
||||
//// /** foo's comment*/
|
||||
@ -10,7 +10,7 @@
|
||||
//// return /*2*/b;
|
||||
//// }
|
||||
//// /** m2 comments*/
|
||||
//// export module m2 {
|
||||
//// export namespace m2 {
|
||||
//// /** class comment;*/
|
||||
//// export class c {
|
||||
//// };
|
||||
@ -36,7 +36,7 @@ edit.insert('');
|
||||
|
||||
goTo.file("commentsExternalModules_file0.ts");
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("module m1", "Module comment");
|
||||
verify.quickInfoIs("namespace m1", "Namespace comment");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("b", "var m1.b: number", "b's comment");
|
||||
@ -48,12 +48,12 @@ goTo.marker('3q');
|
||||
verify.quickInfoIs("function foo(): number", "foo's comment");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.completionListContains("m1", "module m1", "Module comment");
|
||||
verify.completionListContains("m1", "namespace m1", "Namespace comment");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.memberListContains("b", "var m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "function m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "module m1.m2");
|
||||
verify.memberListContains("m2", "namespace m1.m2");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
@ -75,12 +75,12 @@ goTo.marker('10');
|
||||
verify.completionListContains("extMod", 'import extMod = require("commentsExternalModules_file0")', "This is on import declaration");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.memberListContains("m1", "module extMod.m1");
|
||||
verify.memberListContains("m1", "namespace extMod.m1");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.memberListContains("b", "var extMod.m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "function extMod.m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "module extMod.m1.m2");
|
||||
verify.memberListContains("m2", "namespace extMod.m1.m2");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: commentsImportDeclaration_file0.ts
|
||||
/////** ModuleComment*/
|
||||
////export module m/*2*/1 {
|
||||
/////** NamespaceComment*/
|
||||
////export namespace m/*2*/1 {
|
||||
//// /** b's comment*/
|
||||
//// export var b: number;
|
||||
//// /** m2 comments*/
|
||||
//// export module m2 {
|
||||
//// export namespace m2 {
|
||||
//// /** class comment;*/
|
||||
//// export class c {
|
||||
//// };
|
||||
@ -25,18 +25,18 @@
|
||||
////var new/*9*/Var = new extMod.m1.m2./*10*/c();
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("module m1", "ModuleComment");
|
||||
verify.quickInfoIs("namespace m1", "NamespaceComment");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('import extMod = require("commentsImportDeclaration_file0")', "Import declaration");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.memberListContains("m1", "module extMod.m1");
|
||||
verify.memberListContains("m1", "namespace extMod.m1");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.memberListContains("b", "var extMod.m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "function extMod.m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "module extMod.m1.m2");
|
||||
verify.memberListContains("m2", "namespace extMod.m1.m2");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.currentSignatureHelpDocCommentIs("exported function");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** Module comment*/
|
||||
////module m/*1*/1 {
|
||||
/////** Namespace comment*/
|
||||
////namespace m/*1*/1 {
|
||||
//// /** b's comment*/
|
||||
//// export var b: number;
|
||||
//// /** foo's comment*/
|
||||
@ -9,7 +9,7 @@
|
||||
//// return /*2*/b;
|
||||
//// }
|
||||
//// /** m2 comments*/
|
||||
//// export module m2 {
|
||||
//// export namespace m2 {
|
||||
//// /** class comment;*/
|
||||
//// export class c {
|
||||
//// };
|
||||
@ -23,50 +23,50 @@
|
||||
////}
|
||||
/////*4*/m1./*5*/fooExport(/*6*/);
|
||||
////var my/*7*/var = new m1.m2./*8*/c();
|
||||
/////** module comment of m2.m3*/
|
||||
////module m2.m3 {
|
||||
/////** namespace comment of m2.m3*/
|
||||
////namespace m2.m3 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
////}
|
||||
////new /*9*/m2./*10*/m3./*11*/c();
|
||||
/////** module comment of m3.m4.m5*/
|
||||
////module m3.m4.m5 {
|
||||
/////** namespace comment of m3.m4.m5*/
|
||||
////namespace m3.m4.m5 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
////}
|
||||
////new /*12*/m3./*13*/m4./*14*/m5./*15*/c();
|
||||
/////** module comment of m4.m5.m6*/
|
||||
////module m4.m5.m6 {
|
||||
//// export module m7 {
|
||||
/////** namespace comment of m4.m5.m6*/
|
||||
////namespace m4.m5.m6 {
|
||||
//// export namespace m7 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////new /*16*/m4./*17*/m5./*18*/m6./*19*/m7./*20*/c();
|
||||
/////** module comment of m5.m6.m7*/
|
||||
////module m5.m6.m7 {
|
||||
//// /** module m8 comment*/
|
||||
//// export module m8 {
|
||||
/////** namespace comment of m5.m6.m7*/
|
||||
////namespace m5.m6.m7 {
|
||||
//// /** namespace m8 comment*/
|
||||
//// export namespace m8 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////new /*21*/m5./*22*/m6./*23*/m7./*24*/m8./*25*/c();
|
||||
////module m6.m7 {
|
||||
//// export module m8 {
|
||||
////namespace m6.m7 {
|
||||
//// export namespace m8 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
////new /*26*/m6./*27*/m7./*28*/m8./*29*/c();
|
||||
////module m7.m8 {
|
||||
//// /** module m9 comment*/
|
||||
//// export module m9 {
|
||||
////namespace m7.m8 {
|
||||
//// /** namespace m9 comment*/
|
||||
//// export namespace m9 {
|
||||
//// /** Exported class comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
@ -78,15 +78,15 @@
|
||||
//// }
|
||||
//// export var b: /*34*/c;
|
||||
////}
|
||||
////module complexM {
|
||||
//// export module m1 {
|
||||
////namespace complexM {
|
||||
//// export namespace m1 {
|
||||
//// export class c {
|
||||
//// public foo() {
|
||||
//// return 30;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//// export module m2 {
|
||||
//// export namespace m2 {
|
||||
//// export class c {
|
||||
//// public foo2() {
|
||||
//// return new complexM.m1.c();
|
||||
@ -97,7 +97,7 @@
|
||||
////var myComp/*35*/lexVal = new compl/*36*/exM.m/*37*/2./*38*/c().f/*39*/oo2().f/*40*/oo();
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("module m1", "Module comment");
|
||||
verify.quickInfoIs("namespace m1", "Namespace comment");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains("b", "var m1.b: number", "b's comment");
|
||||
@ -109,12 +109,12 @@ goTo.marker('3q');
|
||||
verify.quickInfoIs("function foo(): number", "foo's comment");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.completionListContains("m1", "module m1", "Module comment");
|
||||
verify.completionListContains("m1", "namespace m1", "Namespace comment");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.memberListContains("b", "var m1.b: number", "b's comment");
|
||||
verify.memberListContains("fooExport", "function m1.fooExport(): number", "exported function");
|
||||
verify.memberListContains("m2", "module m1.m2");
|
||||
verify.memberListContains("m2", "namespace m1.m2");
|
||||
verify.quickInfoIs("function m1.fooExport(): number", "exported function");
|
||||
|
||||
goTo.marker('6');
|
||||
@ -129,100 +129,100 @@ verify.memberListContains("c", "constructor m1.m2.c(): m1.m2.c", "");
|
||||
verify.memberListContains("i", "var m1.m2.i: m1.m2.c", "i");
|
||||
|
||||
goTo.marker('9');
|
||||
verify.completionListContains("m2", "module m2", "");
|
||||
verify.quickInfoIs("module m2", "");
|
||||
verify.completionListContains("m2", "namespace m2", "");
|
||||
verify.quickInfoIs("namespace m2", "");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.memberListContains("m3", "module m2.m3");
|
||||
verify.quickInfoIs("module m2.m3", "module comment of m2.m3");
|
||||
verify.memberListContains("m3", "namespace m2.m3");
|
||||
verify.quickInfoIs("namespace m2.m3", "namespace comment of m2.m3");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.quickInfoIs("constructor m2.m3.c(): m2.m3.c", "");
|
||||
verify.memberListContains("c", "constructor m2.m3.c(): m2.m3.c", "");
|
||||
|
||||
goTo.marker('12');
|
||||
verify.completionListContains("m3", "module m3", "");
|
||||
verify.quickInfoIs("module m3", "");
|
||||
verify.completionListContains("m3", "namespace m3", "");
|
||||
verify.quickInfoIs("namespace m3", "");
|
||||
|
||||
goTo.marker('13');
|
||||
verify.memberListContains("m4", "module m3.m4", "");
|
||||
verify.quickInfoIs("module m3.m4", "");
|
||||
verify.memberListContains("m4", "namespace m3.m4", "");
|
||||
verify.quickInfoIs("namespace m3.m4", "");
|
||||
|
||||
goTo.marker('14');
|
||||
verify.memberListContains("m5", "module m3.m4.m5");
|
||||
verify.quickInfoIs("module m3.m4.m5", "module comment of m3.m4.m5");
|
||||
verify.memberListContains("m5", "namespace m3.m4.m5");
|
||||
verify.quickInfoIs("namespace m3.m4.m5", "namespace comment of m3.m4.m5");
|
||||
|
||||
goTo.marker('15');
|
||||
verify.quickInfoIs("constructor m3.m4.m5.c(): m3.m4.m5.c", "");
|
||||
verify.memberListContains("c", "constructor m3.m4.m5.c(): m3.m4.m5.c", "");
|
||||
|
||||
goTo.marker('16');
|
||||
verify.completionListContains("m4", "module m4", "");
|
||||
verify.quickInfoIs("module m4", "");
|
||||
verify.completionListContains("m4", "namespace m4", "");
|
||||
verify.quickInfoIs("namespace m4", "");
|
||||
|
||||
goTo.marker('17');
|
||||
verify.memberListContains("m5", "module m4.m5", "");
|
||||
verify.quickInfoIs("module m4.m5", "");
|
||||
verify.memberListContains("m5", "namespace m4.m5", "");
|
||||
verify.quickInfoIs("namespace m4.m5", "");
|
||||
|
||||
goTo.marker('18');
|
||||
verify.memberListContains("m6", "module m4.m5.m6");
|
||||
verify.quickInfoIs("module m4.m5.m6", "module comment of m4.m5.m6");
|
||||
verify.memberListContains("m6", "namespace m4.m5.m6");
|
||||
verify.quickInfoIs("namespace m4.m5.m6", "namespace comment of m4.m5.m6");
|
||||
|
||||
goTo.marker('19');
|
||||
verify.memberListContains("m7", "module m4.m5.m6.m7");
|
||||
verify.quickInfoIs("module m4.m5.m6.m7", "");
|
||||
verify.memberListContains("m7", "namespace m4.m5.m6.m7");
|
||||
verify.quickInfoIs("namespace m4.m5.m6.m7", "");
|
||||
|
||||
goTo.marker('20');
|
||||
verify.memberListContains("c", "constructor m4.m5.m6.m7.c(): m4.m5.m6.m7.c", "");
|
||||
verify.quickInfoIs("constructor m4.m5.m6.m7.c(): m4.m5.m6.m7.c", "");
|
||||
|
||||
goTo.marker('21');
|
||||
verify.completionListContains("m5", "module m5");
|
||||
verify.quickInfoIs("module m5", "");
|
||||
verify.completionListContains("m5", "namespace m5");
|
||||
verify.quickInfoIs("namespace m5", "");
|
||||
|
||||
goTo.marker('22');
|
||||
verify.memberListContains("m6", "module m5.m6");
|
||||
verify.quickInfoIs("module m5.m6", "");
|
||||
verify.memberListContains("m6", "namespace m5.m6");
|
||||
verify.quickInfoIs("namespace m5.m6", "");
|
||||
|
||||
goTo.marker('23');
|
||||
verify.memberListContains("m7", "module m5.m6.m7");
|
||||
verify.quickInfoIs("module m5.m6.m7", "module comment of m5.m6.m7");
|
||||
verify.memberListContains("m7", "namespace m5.m6.m7");
|
||||
verify.quickInfoIs("namespace m5.m6.m7", "namespace comment of m5.m6.m7");
|
||||
|
||||
goTo.marker('24');
|
||||
verify.memberListContains("m8", "module m5.m6.m7.m8");
|
||||
verify.quickInfoIs("module m5.m6.m7.m8", "module m8 comment");
|
||||
verify.memberListContains("m8", "namespace m5.m6.m7.m8");
|
||||
verify.quickInfoIs("namespace m5.m6.m7.m8", "namespace m8 comment");
|
||||
|
||||
goTo.marker('25');
|
||||
verify.memberListContains("c", "constructor m5.m6.m7.m8.c(): m5.m6.m7.m8.c", "");
|
||||
verify.quickInfoIs("constructor m5.m6.m7.m8.c(): m5.m6.m7.m8.c", "");
|
||||
|
||||
goTo.marker('26');
|
||||
verify.completionListContains("m6", "module m6");
|
||||
verify.quickInfoIs("module m6", "");
|
||||
verify.completionListContains("m6", "namespace m6");
|
||||
verify.quickInfoIs("namespace m6", "");
|
||||
|
||||
goTo.marker('27');
|
||||
verify.memberListContains("m7", "module m6.m7");
|
||||
verify.quickInfoIs("module m6.m7", "");
|
||||
verify.memberListContains("m7", "namespace m6.m7");
|
||||
verify.quickInfoIs("namespace m6.m7", "");
|
||||
|
||||
goTo.marker('28');
|
||||
verify.memberListContains("m8", "module m6.m7.m8");
|
||||
verify.quickInfoIs("module m6.m7.m8", "");
|
||||
verify.memberListContains("m8", "namespace m6.m7.m8");
|
||||
verify.quickInfoIs("namespace m6.m7.m8", "");
|
||||
|
||||
goTo.marker('29');
|
||||
verify.memberListContains("c", "constructor m6.m7.m8.c(): m6.m7.m8.c", "");
|
||||
verify.quickInfoIs("constructor m6.m7.m8.c(): m6.m7.m8.c", "");
|
||||
|
||||
goTo.marker('30');
|
||||
verify.completionListContains("m7", "module m7");
|
||||
verify.quickInfoIs("module m7", "");
|
||||
verify.completionListContains("m7", "namespace m7");
|
||||
verify.quickInfoIs("namespace m7", "");
|
||||
|
||||
goTo.marker('31');
|
||||
verify.memberListContains("m8", "module m7.m8");
|
||||
verify.quickInfoIs("module m7.m8", "");
|
||||
verify.memberListContains("m8", "namespace m7.m8");
|
||||
verify.quickInfoIs("namespace m7.m8", "");
|
||||
|
||||
goTo.marker('32');
|
||||
verify.memberListContains("m9", "module m7.m8.m9");
|
||||
verify.quickInfoIs("module m7.m8.m9", "module m9 comment");
|
||||
verify.memberListContains("m9", "namespace m7.m8.m9");
|
||||
verify.quickInfoIs("namespace m7.m8.m9", "namespace m9 comment");
|
||||
|
||||
goTo.marker('33');
|
||||
verify.memberListContains("c", "constructor m7.m8.m9.c(): m7.m8.m9.c", "");
|
||||
@ -236,10 +236,10 @@ goTo.marker('35');
|
||||
verify.quickInfoIs("var myComplexVal: number", "");
|
||||
|
||||
goTo.marker('36');
|
||||
verify.quickInfoIs("module complexM", "");
|
||||
verify.quickInfoIs("namespace complexM", "");
|
||||
|
||||
goTo.marker('37');
|
||||
verify.quickInfoIs("module complexM.m2", "");
|
||||
verify.quickInfoIs("namespace complexM.m2", "");
|
||||
|
||||
goTo.marker('38');
|
||||
verify.quickInfoIs("constructor complexM.m2.c(): complexM.m2.c", "");
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: commentsMultiModuleMultiFile_0.ts
|
||||
/////** this is multi declare module*/
|
||||
////module mult/*3*/iM {
|
||||
/////** this is multi declare namespace*/
|
||||
////namespace mult/*3*/iM {
|
||||
//// /** class b*/
|
||||
//// export class b {
|
||||
//// }
|
||||
////}
|
||||
/////** thi is multi module 2*/
|
||||
////module mu/*2*/ltiM {
|
||||
/////** thi is multi namespace 2*/
|
||||
////namespace mu/*2*/ltiM {
|
||||
//// /** class c comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
@ -18,8 +18,8 @@
|
||||
////new mu/*5*/ltiM.c();
|
||||
|
||||
// @Filename: commentsMultiModuleMultiFile_1.ts
|
||||
/////** this is multi module 3 comment*/
|
||||
////module mu/*6*/ltiM {
|
||||
/////** this is multi namespace 3 comment*/
|
||||
////namespace mu/*6*/ltiM {
|
||||
//// /** class d comment*/
|
||||
//// export class d {
|
||||
//// }
|
||||
@ -30,25 +30,25 @@
|
||||
edit.insert('');
|
||||
debugger;
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
verify.completionListContains("multiM", "namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment");
|
||||
|
||||
goTo.marker('7');
|
||||
verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
verify.completionListContains("multiM", "namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment");
|
||||
|
||||
goTo.marker('8');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2\nthis is multi module 3 comment");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2\nthis is multi namespace 3 comment");
|
||||
@ -1,13 +1,13 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////** this is multi declare module*/
|
||||
////module mult/*3*/iM {
|
||||
/////** this is multi declare namespace*/
|
||||
////namespace mult/*3*/iM {
|
||||
//// /** class b*/
|
||||
//// export class b {
|
||||
//// }
|
||||
////}
|
||||
/////** thi is multi module 2*/
|
||||
////module mu/*2*/ltiM {
|
||||
/////** thi is multi namespace 2*/
|
||||
////namespace mu/*2*/ltiM {
|
||||
//// /** class c comment*/
|
||||
//// export class c {
|
||||
//// }
|
||||
@ -20,16 +20,16 @@
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains("multiM", "module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
verify.completionListContains("multiM", "namespace multiM", "this is multi declare namespace\nthi is multi namespace 2");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2");
|
||||
|
||||
goTo.marker('4');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2");
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs("module multiM", "this is multi declare module\nthi is multi module 2");
|
||||
verify.quickInfoIs("namespace multiM", "this is multi declare namespace\nthi is multi namespace 2");
|
||||
@ -1,6 +1,6 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
////namespace mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
@ -19,7 +19,7 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// namespace mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
@ -56,8 +56,8 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// namespace m1Mod { }
|
||||
//// export namespace m1eMod { }
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
@ -78,7 +78,7 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// export namespace mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
@ -114,18 +114,18 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// namespace mMod { }
|
||||
//// export namespace meMod { }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
////// EXTENDING NAMESPACE 1
|
||||
////namespace mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
////namespace mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
@ -139,7 +139,7 @@
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// namespace mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
@ -162,14 +162,14 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
//// export namespace mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
////namespace mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
////namespace mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn(shadow: any) {
|
||||
//// var bar = 1;
|
||||
@ -190,10 +190,10 @@
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
//// /*shadowModuleWithNoExport*/
|
||||
//// /*shadowNamespaceWithNoExport*/
|
||||
////}
|
||||
////
|
||||
////module mod4 {
|
||||
////namespace mod4 {
|
||||
//// export var shwvar = "shadow";
|
||||
//// export function shwfn(shadow: any) {
|
||||
//// var bar = 1;
|
||||
@ -213,13 +213,13 @@
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
//// /*shadowModuleWithExport*/
|
||||
//// /*shadowNamespaceWithExport*/
|
||||
////}
|
||||
////
|
||||
////module mod5 {
|
||||
////namespace mod5 {
|
||||
//// import Mod1 = mod1;
|
||||
//// import iMod1 = mod1.mod1emod;
|
||||
//// /*moduleWithImport*/
|
||||
//// /*namespaceWithImport*/
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
@ -276,27 +276,27 @@ function goToMarkAndVerifyShadow()
|
||||
verify.not.completionListContains('mod2emod');
|
||||
}
|
||||
|
||||
// from a shadow module with no export
|
||||
goTo.marker('shadowModuleWithNoExport');
|
||||
// from a shadow namespace with no export
|
||||
goTo.marker('shadowNamespaceWithNoExport');
|
||||
verify.completionListContains('shwvar', 'var shwvar: string');
|
||||
verify.completionListContains('shwfn', 'function shwfn(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
goToMarkAndVerifyShadow();
|
||||
|
||||
// from a shadow module with export
|
||||
goTo.marker('shadowModuleWithExport');
|
||||
// from a shadow namespace with export
|
||||
goTo.marker('shadowNamespaceWithExport');
|
||||
verify.completionListContains('shwvar', 'var mod4.shwvar: string');
|
||||
verify.completionListContains('shwfn', 'function mod4.shwfn(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'class mod4.shwcls');
|
||||
verify.completionListContains('shwint', 'interface mod4.shwint');
|
||||
goToMarkAndVerifyShadow();
|
||||
|
||||
// from a modlue with import
|
||||
goTo.marker('moduleWithImport');
|
||||
verify.completionListContains('mod1', 'module mod1');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
// from a namespace with import
|
||||
goTo.marker('namespaceWithImport');
|
||||
verify.completionListContains('mod1', 'namespace mod1');
|
||||
verify.completionListContains('mod2', 'namespace mod2');
|
||||
verify.completionListContains('mod3', 'namespace mod3');
|
||||
verify.completionListContains('shwvar', 'var shwvar: number');
|
||||
verify.completionListContains('shwfn', 'function shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
////namespace mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
@ -22,7 +22,7 @@
|
||||
//// foob(bar: any): any;
|
||||
//// /*interface*/
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// namespace mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
@ -59,9 +59,9 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// /*module*/
|
||||
//// namespace m1Mod { }
|
||||
//// export namespace m1eMod { }
|
||||
//// /*namespace*/
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
@ -85,7 +85,7 @@
|
||||
//// foob(bar: any): any;
|
||||
//// /*exportedInterface*/
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// export namespace mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
@ -121,21 +121,21 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// /*exportedModule*/
|
||||
//// namespace mMod { }
|
||||
//// export namespace meMod { }
|
||||
//// /*exportedNamespace*/
|
||||
//// }
|
||||
//// /*mod1*/
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
////// EXTENDING NAMESPACE 1
|
||||
////namespace mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
//// /*extendedModule*/
|
||||
//// /*extendedNamespace*/
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
////namespace mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
@ -149,7 +149,7 @@
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// namespace mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
@ -172,14 +172,14 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
//// export namespace mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
////namespace mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
////namespace mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn() {
|
||||
//// var bar = 1;
|
||||
@ -233,15 +233,15 @@ function goToMarkAndGeneralVerify(marker: string)
|
||||
verify.completionListContains('mod1fn', 'function mod1fn(): void');
|
||||
verify.completionListContains('mod1cls', 'class mod1cls');
|
||||
verify.completionListContains('mod1int', 'interface mod1int');
|
||||
verify.completionListContains('mod1mod', 'module mod1mod');
|
||||
verify.completionListContains('mod1mod', 'namespace mod1mod');
|
||||
verify.completionListContains('mod1evar', 'var mod1.mod1evar: number');
|
||||
verify.completionListContains('mod1efn', 'function mod1.mod1efn(): void');
|
||||
verify.completionListContains('mod1ecls', 'class mod1.mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'interface mod1.mod1eint');
|
||||
verify.completionListContains('mod1emod', 'module mod1.mod1emod');
|
||||
verify.completionListContains('mod1emod', 'namespace mod1.mod1emod');
|
||||
verify.completionListContains('mod1eexvar', 'var mod1.mod1eexvar: number');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('mod2', 'namespace mod2');
|
||||
verify.completionListContains('mod3', 'namespace mod3');
|
||||
verify.completionListContains('shwvar', 'var shwvar: number');
|
||||
verify.completionListContains('shwfn', 'function shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
@ -287,18 +287,18 @@ goToMarkAndGeneralVerify('class');
|
||||
// from interface in mod1
|
||||
goToMarkAndGeneralVerify('interface');
|
||||
|
||||
// from module in mod1
|
||||
goToMarkAndGeneralVerify('module');
|
||||
// from namespace in mod1
|
||||
goToMarkAndGeneralVerify('namespace');
|
||||
verify.completionListContains('m1X', 'var m1X: number');
|
||||
verify.completionListContains('m1Func', 'function m1Func(): void');
|
||||
verify.completionListContains('m1Class', 'class m1Class');
|
||||
verify.completionListContains('m1Int', 'interface m1Int');
|
||||
verify.completionListContains('m1Mod', 'module m1Mod');
|
||||
verify.completionListContains('m1Mod', 'namespace m1Mod');
|
||||
verify.completionListContains('m1eX', 'var mod1mod.m1eX: number');
|
||||
verify.completionListContains('m1eFunc', 'function mod1mod.m1eFunc(): void');
|
||||
verify.completionListContains('m1eClass', 'class mod1mod.m1eClass');
|
||||
verify.completionListContains('m1eInt', 'interface mod1mod.m1eInt');
|
||||
verify.completionListContains('m1eMod', 'module mod1mod.m1eMod');
|
||||
verify.completionListContains('m1eMod', 'namespace mod1mod.m1eMod');
|
||||
|
||||
// from exported function in mod1
|
||||
goToMarkAndGeneralVerify('exportedFunction');
|
||||
@ -313,29 +313,29 @@ goToMarkAndGeneralVerify('exportedClass');
|
||||
// from exported interface in mod1
|
||||
goToMarkAndGeneralVerify('exportedInterface');
|
||||
|
||||
// from exported module in mod1
|
||||
goToMarkAndGeneralVerify('exportedModule');
|
||||
// from exported namespace in mod1
|
||||
goToMarkAndGeneralVerify('exportedNamespace');
|
||||
verify.completionListContains('mX', 'var mX: number');
|
||||
verify.completionListContains('mFunc', 'function mFunc(): void');
|
||||
verify.completionListContains('mClass', 'class mClass');
|
||||
verify.completionListContains('mInt', 'interface mInt');
|
||||
verify.completionListContains('mMod', 'module mMod');
|
||||
verify.completionListContains('mMod', 'namespace mMod');
|
||||
verify.completionListContains('meX', 'var mod1.mod1emod.meX: number');
|
||||
verify.completionListContains('meFunc', 'function mod1.mod1emod.meFunc(): void');
|
||||
verify.completionListContains('meClass', 'class mod1.mod1emod.meClass');
|
||||
verify.completionListContains('meInt', 'interface mod1.mod1emod.meInt');
|
||||
verify.completionListContains('meMod', 'module mod1.mod1emod.meMod');
|
||||
verify.completionListContains('meMod', 'namespace mod1.mod1emod.meMod');
|
||||
|
||||
// from extended module
|
||||
goTo.marker('extendedModule');
|
||||
// from extended namespace
|
||||
goTo.marker('extendedNamespace');
|
||||
verify.completionListContains('mod1evar', 'var mod1.mod1evar: number');
|
||||
verify.completionListContains('mod1efn', 'function mod1.mod1efn(): void');
|
||||
verify.completionListContains('mod1ecls', 'class mod1.mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'interface mod1.mod1eint');
|
||||
verify.completionListContains('mod1emod', 'module mod1.mod1emod');
|
||||
verify.completionListContains('mod1emod', 'namespace mod1.mod1emod');
|
||||
verify.completionListContains('mod1eexvar', 'var mod1.mod1eexvar: number');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('mod2', 'namespace mod2');
|
||||
verify.completionListContains('mod3', 'namespace mod3');
|
||||
verify.completionListContains('shwvar', 'var shwvar: number');
|
||||
verify.completionListContains('shwfn', 'function shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
////namespace mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
@ -19,7 +19,7 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// namespace mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
@ -56,8 +56,8 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// namespace m1Mod { }
|
||||
//// export namespace m1eMod { }
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
@ -78,7 +78,7 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// export namespace mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
@ -114,18 +114,18 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// namespace mMod { }
|
||||
//// export namespace meMod { }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
////// EXTENDING NAMESPACE 1
|
||||
////namespace mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
////namespace mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
@ -139,7 +139,7 @@
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// namespace mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
@ -162,14 +162,14 @@
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
//// export namespace mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
////namespace mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
////namespace mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn() {
|
||||
//// var bar = 1;
|
||||
@ -260,9 +260,9 @@ function goToMarkAndGeneralVerify(marker: string)
|
||||
|
||||
// from global scope
|
||||
goToMarkAndGeneralVerify('global');
|
||||
verify.completionListContains('mod1', 'module mod1');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('mod1', 'namespace mod1');
|
||||
verify.completionListContains('mod2', 'namespace mod2');
|
||||
verify.completionListContains('mod3', 'namespace mod3');
|
||||
verify.completionListContains('shwvar', 'var shwvar: number');
|
||||
verify.completionListContains('shwfn', 'function shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
////namespace mod1 {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() { }
|
||||
//// class mClass { }
|
||||
//// module mMod { }
|
||||
//// namespace mMod { }
|
||||
//// interface mInt {}
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() { }
|
||||
//// export class meClass { }
|
||||
//// export module meMod { export var iMex = 1; }
|
||||
//// export namespace meMod { export var iMex = 1; }
|
||||
//// export interface meInt {}
|
||||
////}
|
||||
////
|
||||
////module frmConfirm {
|
||||
////namespace frmConfirm {
|
||||
//// import Mod1 = mod1;
|
||||
//// import iMod1 = mod1./*1*/meMod;
|
||||
//// Mod1./*2*/meX = 1;
|
||||
@ -24,14 +24,14 @@ goTo.marker('1');
|
||||
verify.completionListContains('meX', 'var mod1.meX: number');
|
||||
verify.completionListContains('meFunc', 'function mod1.meFunc(): void');
|
||||
verify.completionListContains('meClass', 'class mod1.meClass');
|
||||
verify.completionListContains('meMod', 'module mod1.meMod');
|
||||
verify.completionListContains('meMod', 'namespace mod1.meMod');
|
||||
verify.completionListContains('meInt', 'interface mod1.meInt');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('meX', 'var mod1.meX: number');
|
||||
verify.completionListContains('meFunc', 'function mod1.meFunc(): void');
|
||||
verify.completionListContains('meClass', 'class mod1.meClass');
|
||||
verify.completionListContains('meMod', 'module mod1.meMod');
|
||||
verify.completionListContains('meMod', 'namespace mod1.meMod');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.completionListContains('iMex', 'var mod1.meMod.iMex: number');
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// module foo {
|
||||
//// export module bar { module baz { export class boo { } } }
|
||||
//// namespace foo {
|
||||
//// export namespace bar { namespace baz { export class boo { } } }
|
||||
//// }
|
||||
////
|
||||
//// import f = /*foo*/foo;
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
// Sanity check
|
||||
goTo.marker('foo');
|
||||
verify.quickInfoIs('module foo');
|
||||
verify.quickInfoIs('namespace foo');
|
||||
|
||||
// Delete some code
|
||||
goTo.marker('delete');
|
||||
@ -18,4 +18,4 @@ edit.deleteAtCaret('var x;'.length);
|
||||
|
||||
// Pull on the RHS of an import
|
||||
goTo.marker('foo');
|
||||
verify.quickInfoIs('module foo');
|
||||
verify.quickInfoIs('namespace foo');
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// @Filename: quickInfoDisplayPartsExternalModuleAlias_file0.ts
|
||||
////export module m1 {
|
||||
////export namespace m1 {
|
||||
//// export class c {
|
||||
//// }
|
||||
////}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////export module /*1*/m {
|
||||
//// var /*2*/moduleElemWithoutExport = 10;
|
||||
//// export var /*3*/moduleElemWithExport = 10;
|
||||
////export namespace /*1*/m {
|
||||
//// var /*2*/namespaceElemWithoutExport = 10;
|
||||
//// export var /*3*/namespaceElemWithExport = 10;
|
||||
////}
|
||||
////export var /*4*/a = /*5*/m;
|
||||
////export var /*6*/b: typeof /*7*/m;
|
||||
////export module /*8*/m1./*9*/m2 {
|
||||
//// var /*10*/moduleElemWithoutExport = 10;
|
||||
//// export var /*11*/moduleElemWithExport = 10;
|
||||
////export namespace /*8*/m1./*9*/m2 {
|
||||
//// var /*10*/namespaceElemWithoutExport = 10;
|
||||
//// export var /*11*/namespaceElemWithExport = 10;
|
||||
////}
|
||||
////export var /*12*/x = /*13*/m1./*14*/m2;
|
||||
////export var /*15*/y: typeof /*16*/m1./*17*/m2;
|
||||
@ -19,45 +19,45 @@ function goToMarker() {
|
||||
goTo.marker(marker.toString());
|
||||
}
|
||||
|
||||
function verifyModule(name: string, optionalParentName?: string) {
|
||||
function verifyNamespace(name: string, optionalParentName?: string) {
|
||||
goToMarker();
|
||||
var moduleNameDisplay = [{ text: name, kind: "moduleName" }];
|
||||
var namespaceNameDisplay = [{ text: name, kind: "moduleName" }];
|
||||
if (optionalParentName) {
|
||||
moduleNameDisplay = [{ text: optionalParentName, kind: "moduleName" }, { text: ".", kind: "punctuation" }].concat(moduleNameDisplay);
|
||||
namespaceNameDisplay = [{ text: optionalParentName, kind: "moduleName" }, { text: ".", kind: "punctuation" }].concat(namespaceNameDisplay);
|
||||
}
|
||||
verify.verifyQuickInfoDisplayParts("module", "export", { start: test.markerByName(marker.toString()).position, length: name.length },
|
||||
[{ text: "module", kind: "keyword" }, { text: " ", kind: "space" }].concat(moduleNameDisplay),
|
||||
[{ text: "namespace", kind: "keyword" }, { text: " ", kind: "space" }].concat(namespaceNameDisplay),
|
||||
[]);
|
||||
}
|
||||
|
||||
function verifyVar(name: string, optionalFullName?: ts.SymbolDisplayPart[], typeDisplay: ts.SymbolDisplayPart[]= [{ text: "number", kind: "keyword" }]) {
|
||||
goToMarker();
|
||||
verify.verifyQuickInfoDisplayParts("var", name === "moduleElemWithoutExport" ? "" : "export", { start: test.markerByName(marker.toString()).position, length: name.length },
|
||||
verify.verifyQuickInfoDisplayParts("var", name === "namespaceElemWithoutExport" ? "" : "export", { start: test.markerByName(marker.toString()).position, length: name.length },
|
||||
[{ text: "var", kind: "keyword" },
|
||||
{ text: " ", kind: "space" }].concat(optionalFullName || [{ text: name, kind: "localName" }]).concat(
|
||||
{ text: ":", kind: "punctuation" }, { text: " ", kind: "space" }).concat(typeDisplay),
|
||||
[]);
|
||||
}
|
||||
|
||||
verifyModule("m");
|
||||
verifyVar("moduleElemWithoutExport");
|
||||
verifyVar("moduleElemWithExport", [{ text: "m", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "moduleElemWithExport", kind: "localName" }]);
|
||||
verifyNamespace("m");
|
||||
verifyVar("namespaceElemWithoutExport");
|
||||
verifyVar("namespaceElemWithExport", [{ text: "m", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "namespaceElemWithExport", kind: "localName" }]);
|
||||
|
||||
verifyVar("a", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m", kind: "moduleName" }]);
|
||||
verifyModule("m");
|
||||
verifyNamespace("m");
|
||||
verifyVar("b", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m", kind: "moduleName" }]);
|
||||
verifyModule("m");
|
||||
verifyNamespace("m");
|
||||
|
||||
verifyModule("m1");
|
||||
verifyModule("m2", "m1");
|
||||
verifyVar("moduleElemWithoutExport");
|
||||
verifyVar("moduleElemWithExport", [{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" },
|
||||
{ text: "m2", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "moduleElemWithExport", kind: "localName" }]);
|
||||
verifyNamespace("m1");
|
||||
verifyNamespace("m2", "m1");
|
||||
verifyVar("namespaceElemWithoutExport");
|
||||
verifyVar("namespaceElemWithExport", [{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" },
|
||||
{ text: "m2", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "namespaceElemWithExport", kind: "localName" }]);
|
||||
verifyVar("x", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" },
|
||||
{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "m2", kind: "moduleName" }]);
|
||||
verifyModule("m1");
|
||||
verifyModule("m2", "m1");
|
||||
verifyNamespace("m1");
|
||||
verifyNamespace("m2", "m1");
|
||||
verifyVar("y", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" },
|
||||
{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "m2", kind: "moduleName" }]);
|
||||
verifyModule("m1");
|
||||
verifyModule("m2", "m1");
|
||||
verifyNamespace("m1");
|
||||
verifyNamespace("m2", "m1");
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module /*1*/m {
|
||||
//// var /*2*/moduleElemWithoutExport = 10;
|
||||
//// export var /*3*/moduleElemWithExport = 10;
|
||||
////namespace /*1*/m {
|
||||
//// var /*2*/namespaceElemWithoutExport = 10;
|
||||
//// export var /*3*/namespaceElemWithExport = 10;
|
||||
////}
|
||||
////var /*4*/a = /*5*/m;
|
||||
////var /*6*/b: typeof /*7*/m;
|
||||
////module /*8*/m1./*9*/m2 {
|
||||
//// var /*10*/moduleElemWithoutExport = 10;
|
||||
//// export var /*11*/moduleElemWithExport = 10;
|
||||
////namespace /*8*/m1./*9*/m2 {
|
||||
//// var /*10*/namespaceElemWithoutExport = 10;
|
||||
//// export var /*11*/namespaceElemWithExport = 10;
|
||||
////}
|
||||
////var /*12*/x = /*13*/m1./*14*/m2;
|
||||
////var /*15*/y: typeof /*16*/m1./*17*/m2;
|
||||
@ -19,14 +19,14 @@ function goToMarker() {
|
||||
goTo.marker(marker.toString());
|
||||
}
|
||||
|
||||
function verifyModule(name: string, optionalParentName?: string) {
|
||||
function verifyNamespace(name: string, optionalParentName?: string) {
|
||||
goToMarker();
|
||||
var moduleNameDisplay = [{ text: name, kind: "moduleName" }];
|
||||
var namespaceNameDisplay = [{ text: name, kind: "moduleName" }];
|
||||
if (optionalParentName) {
|
||||
moduleNameDisplay = [{ text: optionalParentName, kind: "moduleName" }, { text: ".", kind: "punctuation" }].concat(moduleNameDisplay);
|
||||
namespaceNameDisplay = [{ text: optionalParentName, kind: "moduleName" }, { text: ".", kind: "punctuation" }].concat(namespaceNameDisplay);
|
||||
}
|
||||
verify.verifyQuickInfoDisplayParts("module", optionalParentName ? "export" : "", { start: test.markerByName(marker.toString()).position, length: name.length },
|
||||
[{ text: "module", kind: "keyword" }, { text: " ", kind: "space" }].concat(moduleNameDisplay),
|
||||
[{ text: "namespace", kind: "keyword" }, { text: " ", kind: "space" }].concat(namespaceNameDisplay),
|
||||
[]);
|
||||
}
|
||||
|
||||
@ -39,25 +39,25 @@ function verifyVar(name: string, optionalFullName?: ts.SymbolDisplayPart[], type
|
||||
[]);
|
||||
}
|
||||
|
||||
verifyModule("m");
|
||||
verifyVar("moduleElemWithoutExport");
|
||||
verifyVar("moduleElemWithExport", [{ text: "m", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "moduleElemWithExport", kind: "localName" }]);
|
||||
verifyNamespace("m");
|
||||
verifyVar("namespaceElemWithoutExport");
|
||||
verifyVar("namespaceElemWithExport", [{ text: "m", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "namespaceElemWithExport", kind: "localName" }]);
|
||||
|
||||
verifyVar("a", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m", kind: "moduleName" }]);
|
||||
verifyModule("m");
|
||||
verifyNamespace("m");
|
||||
verifyVar("b", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" }, { text: "m", kind: "moduleName" }]);
|
||||
verifyModule("m");
|
||||
verifyNamespace("m");
|
||||
|
||||
verifyModule("m1");
|
||||
verifyModule("m2", "m1");
|
||||
verifyVar("moduleElemWithoutExport");
|
||||
verifyVar("moduleElemWithExport", [{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" },
|
||||
{ text: "m2", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "moduleElemWithExport", kind: "localName" }]);
|
||||
verifyNamespace("m1");
|
||||
verifyNamespace("m2", "m1");
|
||||
verifyVar("namespaceElemWithoutExport");
|
||||
verifyVar("namespaceElemWithExport", [{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" },
|
||||
{ text: "m2", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "namespaceElemWithExport", kind: "localName" }]);
|
||||
verifyVar("x", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" },
|
||||
{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "m2", kind: "moduleName" }]);
|
||||
verifyModule("m1");
|
||||
verifyModule("m2", "m1");
|
||||
verifyNamespace("m1");
|
||||
verifyNamespace("m2", "m1");
|
||||
verifyVar("y", /*optionalFullName*/ undefined, [{ text: "typeof", kind: "keyword" }, { text: " ", kind: "space" },
|
||||
{ text: "m1", kind: "moduleName" }, { text: ".", kind: "punctuation" }, { text: "m2", kind: "moduleName" }]);
|
||||
verifyModule("m1");
|
||||
verifyModule("m2", "m1");
|
||||
verifyNamespace("m1");
|
||||
verifyNamespace("m2", "m1");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user