Skip to content

Name of default export should not appear in import completion lists #6124

Closed

Description

Named default exports don't export a named declaration with the original name, so we shouldn't show that name in the list.

  • `file1.ts

    export var x = 10;
    
    export default class C {
    
    }
  • file2.ts

    import { /**/ } from "./file1";

Request completion at /**/

Expected: x and default[1] appears in list
Actual: x and C appear in list.

[1] Yes, default is valid; an ImportSpecifier can have an IdentifierName on the left of the as keyword. As a refresher, an IdentifierName has no restrictions on it.

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions