Skip to content

TS5056 when using JSON and TS files with the same basename in composite project #34943

Closed
@thovden

Description

@thovden

TypeScript Version: 3.7.2

Search Terms: TS5056 composite JSON

Code

Minimal reproduction repo https://github.com/thovden/ts37-ts5056-composite

Compilation fails with a TS5056 when the basename of a Typescript and JSON file is the same in a composite project when using resolveJsonModule

# Project compiles fine without composite
tsc

# Using a composite project does not...
tsc -p tsconfig.composite.json
error TS5056: Cannot write file '.../ts37-ts5056-composite/dist/test.d.ts' because it would be overwritten by multiple input files.

Expected behavior:

Compiles fine in a composite project.

Actual behavior:

error TS5056: Cannot write file '.../ts37-ts5056-composite/dist/test.d.ts' because it would be overwritten by multiple input files.

Playground Link:

Related Issues:

@sheetalkamat has been working on related issues - e.g., #34676 , #33827

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions