I have a typescript project and it's possible that I want to publish it as an NPM package in the future.
Now at the moment I have set "declaration": true
in my tsconfig.json
.
However this causes me some problems (which don't really matter for this question).
If I set it to false
everything works asI want it to.
The declaration
flag when set to true, generates d.ts
files. However my understanding according to the post
About "*.d.ts" in TypeScript is, that this is only relevant if you're not already programming in typescript (i.e. your project is javascript), so that you can later easily use this javascript library in a typescript project, because you now have the types.
So why should anyone ever set this setting to true
when the project is "pure" typescript? Can I safely set it to false
?