Skip to content

TypeScript should error on duplicate output locations #4424

Closed

Description

With the support now for .tsx and .ts files, it is possible to have multiple input files with the same root name in a compilation (i.e. file1.ts and file1.tsx). Both of these may try to generate the same output file on compilation (i.e. file1.js), and only one will win. If/when more extensions for input (or output) files are added, this will exacerbate the problem.

TypeScript should detect collisions on emitted files and error. (Ideally for resilience and future proofing, it should also detect if an emitted file would overwrite one of the input files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions