2017-12-01 22:00:01 +01:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
// @noLib: true
|
|
|
|
|
|
|
|
// @Filename: /a.ts
|
2018-01-03 22:51:33 +01:00
|
|
|
////export namespace Name {
|
2017-12-01 22:00:01 +01:00
|
|
|
//// export class C {}
|
|
|
|
////}
|
2018-01-03 22:51:33 +01:00
|
|
|
////export function f(c: Name.C) {}
|
|
|
|
////f(new N/*a0*/);
|
|
|
|
////f(new /*a1*/);
|
2017-12-01 22:00:01 +01:00
|
|
|
|
|
|
|
// @Filename: /b.ts
|
|
|
|
////import { f } from "./a";
|
2018-01-03 22:51:33 +01:00
|
|
|
// Here we will recommend a new import of 'Name'
|
|
|
|
////f(new N/*b0*/);
|
|
|
|
////f(new /*b1*/);
|
2017-12-01 22:00:01 +01:00
|
|
|
|
|
|
|
// @Filename: /c.ts
|
2018-01-03 22:51:33 +01:00
|
|
|
////import * as alpha from "./a";
|
|
|
|
// Here we will recommend 'a' because it contains 'Name' which contains 'C'.
|
|
|
|
////alpha.f(new a/*c0*/);
|
|
|
|
////alpha.f(new /*c1*/);
|
2017-12-01 22:00:01 +01:00
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions(
|
2018-10-30 19:56:34 +01:00
|
|
|
{
|
|
|
|
marker: ["a0", "a1"],
|
|
|
|
includes: { name: "Name", text: "namespace Name", kind: "module", kindModifiers: "export", isRecommended: true },
|
|
|
|
},
|
2018-10-29 18:03:25 +01:00
|
|
|
{
|
|
|
|
marker: ["b0", "b1"],
|
2018-10-30 19:56:34 +01:00
|
|
|
includes: {
|
|
|
|
name: "Name",
|
|
|
|
source: "/a",
|
|
|
|
sourceDisplay: "./a",
|
|
|
|
text: "namespace Name",
|
|
|
|
kind: "module",
|
|
|
|
kindModifiers: "export",
|
|
|
|
hasAction: true,
|
|
|
|
isRecommended: true,
|
2019-05-16 23:46:10 +02:00
|
|
|
sortText: completion.SortText.AutoImportSuggestions
|
2018-10-30 19:56:34 +01:00
|
|
|
},
|
2018-10-29 18:03:25 +01:00
|
|
|
preferences: { includeCompletionsForModuleExports: true },
|
|
|
|
},
|
|
|
|
{ marker: ["c0", "c1"], includes: { name: "alpha", text: "import alpha", kind: "alias", isRecommended: true } },
|
|
|
|
);
|