1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
/// <reference path="fourslash.ts" />
// @noLib: true
// @Filename: /a.ts
////export namespace Name {
//// export class C {}
////}
////export function f(c: Name.C) {}
////f(new N/*a0*/);
////f(new /*a1*/);
// @Filename: /b.ts
////import { f } from "./a";
// Here we will recommend a new import of 'Name'
////f(new N/*b0*/);
////f(new /*b1*/);
// @Filename: /c.ts
////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*/);
verify.completions(
{
marker: ["a0", "a1"],
includes: { name: "Name", text: "namespace Name", kind: "module", kindModifiers: "export", isRecommended: true },
},
{
marker: ["b0", "b1"],
includes: {
name: "Name",
source: "/a",
sourceDisplay: "./a",
text: "namespace Name",
kind: "module",
kindModifiers: "export",
hasAction: true,
isRecommended: true,
sortText: completion.SortText.AutoImportSuggestions
},
preferences: { includeCompletionsForModuleExports: true },
},
{ marker: ["c0", "c1"], includes: { name: "alpha", text: "import alpha", kind: "alias", isRecommended: true } },
);
|