microsoft / microsoft/TypeScript
TypeScript complains about overwriting .d.ts files that are potentially known outputs
Open
Nobody has claimed this yet.
Awaiting More Feedback
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Using tsc at the command line, I got
error TS5055: Cannot write file '/Users/alexamil/WebstormProjects/oresoftware/ldap-pool/index.d.ts' because it would overwrite input file.
why? :)
my tsconfig.json file is as follows
{
"compilerOptions": {
"declaration": true,
"baseUrl": ".",
"types": [
"node"
],
"typeRoots": [
"node_modules/@types"
],
"target": "es5",
"module": "commonjs",
"noImplicitAny": true,
"removeComments": true,
"allowUnreachableCode": true,
"lib": [
"es2015",
"es2016",
"es2017"
]
},
"compileOnSave": false,
"exclude": [
"node_modules"
]
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the command-line tsc invocation and the provided tsconfig.json, focusing on declaration output and the excluded node_modules directory. Trace how the compiler identifies input files and generated .d.ts outputs, then determine the expected behavior for this case and add or update regression coverage if the behavior should change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100