Skip to content

Common import/export refactorings are missing #19260

Closed

Description

There are two scenarios that come up for me all the time that presently don't have refactoring support:

  1. Refactoring a named export into the default export and vice versa
  2. Refactoring a bunch of explicit named imports into a namespace import and vice versa

Commentary:

I think both of these refactorings would be helpful and be used frequently. 1 is important to me because I can't decide on the shape of a module's exports until its export surface area is complete, and I switch between the two frequently during development.

2 is important to me when a module's named exports grow and grow and on the import side and I finally reach a point where I would like to move to a namespace import to avoid having to name every single import. This transformation is very painful to do by hand.

Activity

  1. added
    Domain: LS: Refactorings
    on Oct 17, 2017
  2. amcasey commented on Jan 11, 2018

    @amcasey
    Member

    Andy (Andrewkraft) (@Andy-MS) I remember you implementing some import conversion refactorings. Have some of these points already been addressed?

  3. ghost added
    Fixed
    on Jun 11, 2018
  4. ghost closed this as completedin #24878on Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: LS: RefactoringsFixedSuggestion

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions