9615e54e13
* Support multiple completions with the same name but different source module * Use optional parameters for source * Simplify use of `uniques` * Update test * Fix `undefined` error
21 lines
517 B
TypeScript
21 lines
517 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
// @Filename: /a.ts
|
|
////export default function foo() {}
|
|
|
|
// @Filename: /b.ts
|
|
////f/**/;
|
|
|
|
goTo.marker("");
|
|
verify.completionListContains({ name: "foo", source: "/a" }, "function foo(): void", "", "function", /*spanIndex*/ undefined, /*hasAction*/ true);
|
|
|
|
verify.applyCodeActionFromCompletion("", {
|
|
name: "foo",
|
|
source: "/a",
|
|
description: `Import 'foo' from "./a".`,
|
|
// TODO: GH#18445
|
|
newFileContent: `import foo from "./a";\r
|
|
\r
|
|
f;`,
|
|
});
|