You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A .ts file will always result in a .js file. Not emitting a file makes it hard to track issues like a stale .js file generated frim previous builds.
If you do not want any files generated change it to a .d.ts.
Ok, thanks for the explanation, I will definitely try the d.ts solution, but can this be implemented something like a tree shaking process on bundle creation?
The compiler already elides imports that are only used in type position. So this file should never be imported at runtime.
We have discussed bundling in the past and the conclusion was that there are already abundance of bundlers, minifiers, optimizers and the like in the community and there is no reason to introduce yet another tool.
TypeScript Version: 2.3.2
Code
Expected behavior:
It is not expected to be transpiled to JS code in any way if it is the only thing that is exported
Actual behavior:
It is transpiled to an empty module, like this for example:
The text was updated successfully, but these errors were encountered: