2014-09-30 20:58:05 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @Filename: commentsExternalModules_file0.ts
|
2015-04-27 01:12:48 +02:00
|
|
|
/////** Namespace comment*/
|
|
|
|
////export namespace m/*1*/1 {
|
2014-09-30 20:58:05 +02:00
|
|
|
//// /** b's comment*/
|
|
|
|
//// export var b: number;
|
|
|
|
//// /** foo's comment*/
|
|
|
|
//// function foo() {
|
|
|
|
//// return /*2*/b;
|
|
|
|
//// }
|
|
|
|
//// /** m2 comments*/
|
2015-04-27 01:12:48 +02:00
|
|
|
//// export namespace m2 {
|
2014-09-30 20:58:05 +02:00
|
|
|
//// /** class comment;*/
|
|
|
|
//// export class c {
|
|
|
|
//// };
|
|
|
|
//// /** i*/
|
|
|
|
//// export var i = new c();
|
|
|
|
//// }
|
|
|
|
//// /** exported function*/
|
|
|
|
//// export function fooExport() {
|
|
|
|
//// return f/*3q*/oo(/*3*/);
|
|
|
|
//// }
|
|
|
|
////}
|
|
|
|
/////*4*/m1./*5*/fooEx/*6q*/port(/*6*/);
|
|
|
|
////var my/*7*/var = new m1.m2./*8*/c();
|
|
|
|
|
|
|
|
// @Filename: commentsExternalModules_file1.ts
|
|
|
|
/////**This is on import declaration*/
|
2016-02-13 00:40:47 +01:00
|
|
|
////import ex/*9*/tMod = require("./commentsExternalModules_file0");
|
2014-09-30 20:58:05 +02:00
|
|
|
/////*10*/extMod./*11*/m1./*12*/fooExp/*13q*/ort(/*13*/);
|
|
|
|
////var new/*14*/Var = new extMod.m1.m2./*15*/c();
|
|
|
|
|
|
|
|
goTo.file("commentsExternalModules_file0.ts");
|
2016-09-09 18:02:55 +02:00
|
|
|
verify.quickInfoAt("1", "namespace m1", "Namespace comment");
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({
|
|
|
|
marker: "2",
|
|
|
|
includes: [
|
|
|
|
{ name: "b", text: "var b: number", documentation: "b's comment" },
|
|
|
|
{ name: "foo", text: "function foo(): number", documentation: "foo's comment" },
|
|
|
|
]
|
|
|
|
});
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-05-15 21:34:53 +02:00
|
|
|
verify.signatureHelp({ marker: "3", docComment: "foo's comment" });
|
2016-09-09 18:02:55 +02:00
|
|
|
verify.quickInfoAt("3q", "function foo(): number", "foo's comment");
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({
|
|
|
|
marker: "4",
|
|
|
|
includes: { name: "m1", text: "namespace m1", documentation: "Namespace comment" },
|
|
|
|
});
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({
|
|
|
|
marker: "5",
|
|
|
|
includes: [
|
|
|
|
{ name: "b", text: "var m1.b: number", documentation: "b's comment" },
|
|
|
|
{ name: "fooExport", text: "function m1.fooExport(): number", documentation: "exported function" },
|
|
|
|
{ name: "m2", text: "namespace m1.m2", documentation: "m2 comments" },
|
|
|
|
],
|
|
|
|
});
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-05-15 21:34:53 +02:00
|
|
|
verify.signatureHelp({ marker: "6", docComment: "exported function" });
|
2016-09-09 18:02:55 +02:00
|
|
|
verify.quickInfoAt("6q", "function m1.fooExport(): number", "exported function");
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2016-09-09 18:02:55 +02:00
|
|
|
verify.quickInfoAt("7", "var myvar: m1.m2.c");
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({
|
|
|
|
marker: "8",
|
|
|
|
includes: [
|
|
|
|
{ name: "c", text: "constructor m1.m2.c(): m1.m2.c", documentation: "class comment;" },
|
|
|
|
{ name: "i", text: "var m1.m2.i: m1.m2.c", documentation: "i" },
|
|
|
|
],
|
|
|
|
});
|
2014-09-30 20:58:05 +02:00
|
|
|
|
|
|
|
goTo.file("commentsExternalModules_file1.ts");
|
2016-09-09 18:02:55 +02:00
|
|
|
verify.quickInfoAt("9", 'import extMod = require("./commentsExternalModules_file0")', "This is on import declaration");
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions(
|
|
|
|
{
|
|
|
|
marker: "10",
|
|
|
|
includes: { name: "extMod", text: 'import extMod = require("./commentsExternalModules_file0")', documentation: "This is on import declaration" },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
marker: "11",
|
|
|
|
includes: { name: "m1", text: "namespace extMod.m1", documentation: "Namespace comment" },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
marker: "12",
|
|
|
|
includes: [
|
|
|
|
{ name: "b", text: "var extMod.m1.b: number", documentation: "b's comment" },
|
|
|
|
{ name: "fooExport", text: "function extMod.m1.fooExport(): number", documentation: "exported function" },
|
|
|
|
{ name: "m2", text: "namespace extMod.m1.m2", documentation: "m2 comments" },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
);
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-05-15 21:34:53 +02:00
|
|
|
verify.signatureHelp({ marker: "13", docComment: "exported function" });
|
2016-09-09 18:02:55 +02:00
|
|
|
verify.quickInfoAt("13q", "function extMod.m1.fooExport(): number", "exported function");
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2016-09-09 18:02:55 +02:00
|
|
|
verify.quickInfoAt("14", "var newVar: extMod.m1.m2.c");
|
2014-09-30 20:58:05 +02:00
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({
|
|
|
|
marker: "15",
|
|
|
|
exact: [
|
|
|
|
{ name: "c", text: "constructor extMod.m1.m2.c(): extMod.m1.m2.c", documentation: "class comment;" },
|
|
|
|
{ name: "i", text: "var extMod.m1.m2.i: extMod.m1.m2.c", documentation: "i" },
|
|
|
|
],
|
|
|
|
});
|