You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Presence of underscore prefixed item in sorted import list causes auto-import to place new import at the end #51616
After #51565 and #51579, I noticed that auto-import still sometimes puts new things on the bottom. It turns out that it seems to only happen in files that import __String. Given this test:
/// <reference path="fourslash.ts" />// @Filename: /a.ts////export interface HasBar { bar: number }////export function hasBar(x: unknown): x is HasBar { return x && typeof x.bar === "number" }////export function foo() {}////export type __String = string;// @Filename: /b.ts////import { __String, HasBar, hasBar } from "./a";////f/**/;verify.completions({marker: "",includes: {name: "foo",source: "/a",sourceDisplay: "./a",text: "function foo(): void",kind: "function",kindModifiers: "export",hasAction: true,sortText: completion.SortText.AutoImportSuggestions},preferences: {includeCompletionsForModuleExports: true},});verify.applyCodeActionFromCompletion("",{name: "foo",source: "/a",description: `Update import from "./a"`,newFileContent: `import { __String, foo, HasBar, hasBar } from "./a";f;`,});
Activity