2018-01-08 20:33:57 +01:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
2018-04-02 19:21:14 +02:00
|
|
|
// @module: esnext
|
|
|
|
|
2018-01-08 20:33:57 +01:00
|
|
|
// @Filename: /a.d.ts
|
|
|
|
////declare namespace N {
|
|
|
|
//// export const foo = 0;
|
|
|
|
////}
|
|
|
|
////export = N;
|
|
|
|
|
|
|
|
// @Filename: /b.ts
|
|
|
|
////f/**/;
|
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({
|
|
|
|
marker: "",
|
2018-10-30 19:56:34 +01:00
|
|
|
includes: {
|
|
|
|
name: "foo",
|
|
|
|
source: "/a",
|
|
|
|
sourceDisplay: "./a",
|
|
|
|
text: "const N.foo: 0",
|
|
|
|
kind: "const",
|
|
|
|
kindModifiers: "export,declare",
|
|
|
|
hasAction: 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 },
|
2018-01-08 20:33:57 +01:00
|
|
|
});
|
|
|
|
verify.applyCodeActionFromCompletion("", {
|
|
|
|
name: "foo",
|
|
|
|
source: "/a",
|
|
|
|
description: `Import 'foo' from module "./a"`,
|
2018-01-12 02:43:27 +01:00
|
|
|
newFileContent: `import { foo } from "./a";
|
|
|
|
|
2018-01-08 20:33:57 +01:00
|
|
|
f;`,
|
|
|
|
});
|