Skip to content

Default exports should retain their name #1521

@JasonHK

Description

@JasonHK

Search Terms

default exports

Problem

Currently, the name of default exports will be removed and renamed to default, which could cause confusion like the screenshot below.

2021-02-28_00001

The default of payload is default is NOT the default export of this module.

Suggested Solution

If the default export is named (like function named() {...}, class Named {...}, const named = ..., etc.), TypeDoc should retain its name and add a default badge to indicate it's a default export. Any types that referencing it should use the original name as well, and not default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin ideaThis feature may be best suited for a pluginwontfixDeclining to implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions