00cea41b65
Fixes #15024
36 lines
760 B
TypeScript
36 lines
760 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
// @module: esnext
|
|
|
|
// @Filename: /a.d.ts
|
|
////declare namespace N {
|
|
//// export const foo = 0;
|
|
////}
|
|
////export = N;
|
|
|
|
// @Filename: /b.ts
|
|
////f/**/;
|
|
|
|
verify.completions({
|
|
marker: "",
|
|
includes: {
|
|
name: "foo",
|
|
source: "/a",
|
|
sourceDisplay: "./a",
|
|
text: "const N.foo: 0",
|
|
kind: "const",
|
|
kindModifiers: "export,declare",
|
|
hasAction: true,
|
|
sortText: completion.SortText.AutoImportSuggestions
|
|
},
|
|
preferences: { includeCompletionsForModuleExports: true },
|
|
});
|
|
verify.applyCodeActionFromCompletion("", {
|
|
name: "foo",
|
|
source: "/a",
|
|
description: `Import 'foo' from module "./a"`,
|
|
newFileContent: `import { foo } from "./a";
|
|
|
|
f;`,
|
|
});
|