2018-06-27 03:03:07 +02:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
2018-07-10 19:47:43 +02:00
|
|
|
// @noLib: true
|
|
|
|
|
|
|
|
// @Filename: /globals.d.ts
|
2018-06-27 03:03:07 +02:00
|
|
|
////declare const Symbol: () => symbol;
|
2018-07-10 19:47:43 +02:00
|
|
|
|
|
|
|
// @Filename: /a.ts
|
2018-06-27 03:03:07 +02:00
|
|
|
////const privateSym = Symbol();
|
|
|
|
////export const publicSym = Symbol();
|
|
|
|
////export interface I {
|
|
|
|
//// [privateSym]: number;
|
|
|
|
//// [publicSym]: number;
|
2018-07-10 19:47:43 +02:00
|
|
|
//// [defaultPublicSym]: number;
|
2018-06-27 03:03:07 +02:00
|
|
|
//// n: number;
|
|
|
|
////}
|
|
|
|
////export const i: I;
|
|
|
|
|
|
|
|
// @Filename: /user.ts
|
|
|
|
////import { i } from "./a";
|
|
|
|
////i[|./**/|];
|
|
|
|
|
|
|
|
verify.completions({
|
|
|
|
marker: "",
|
2018-07-10 19:47:43 +02:00
|
|
|
exact: [
|
|
|
|
"n",
|
2018-08-28 22:04:11 +02:00
|
|
|
{ name: "publicSym", source: "/a", insertText: "[publicSym]", replacementSpan: test.ranges()[0], hasAction: true },
|
2018-07-10 19:47:43 +02:00
|
|
|
],
|
2018-06-27 03:03:07 +02:00
|
|
|
preferences: {
|
|
|
|
includeInsertTextCompletions: true,
|
|
|
|
includeCompletionsForModuleExports: true,
|
|
|
|
},
|
|
|
|
});
|
2018-07-10 19:47:43 +02:00
|
|
|
|
|
|
|
verify.applyCodeActionFromCompletion("", {
|
|
|
|
name: "publicSym",
|
|
|
|
source: "/a",
|
|
|
|
description: `Add 'publicSym' to existing import declaration from "./a"`,
|
|
|
|
newFileContent:
|
|
|
|
`import { i, publicSym } from "./a";
|
|
|
|
i.;`
|
|
|
|
});
|