Skip to content

"Convert default export to named export" refactoring is not always available #42605

@OliverJAsh

Description

@OliverJAsh

Bug Report

🔎 Search Terms

quick fix, refactoring, vs code, code action, exports, default, named

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about refactorings

Tested with v4.1.2

⏯ Playground Link

N/A

💻 Code

export default () => {}

or

const foo = () => {};
export default foo;

Highlight the full line containing the default export.

🙁 Actual behavior

"Convert default export to named export" refactoring is not available

🙂 Expected behavior

"Convert default export to named export" refactoring should be available, like how it is for function declarations such as:

export default function foo () {}

image

(For reference, this functionality was added in #24878.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbolHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions