Skip to content

Allow option to omit empty JS and map files from output. #22864

@electricessence

Description

@electricessence

Files/modules that only contain interfaces, declarations, or type aliases (no real JS code) still produce *.js files.

One previous solution was to name all interface only files to *.d.ts and subsequently no JS file was generated, BUT neither is a copy of the *.d.ts file in the output directory. Therefore a second task had to be added to copy these files.

Another solution would be to keep all files as *.ts but find and delete empty files but this is tedious and difficult if you have header comments and source maps.

Optimally, *.ts files that simply do not contain any usable/importable JS (totally empty except comments) should have the option to be omitted from output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions