-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: why isn't it tslib distributed together with tsc? #150
Comments
tslib is a "reimplementation" of the helper functions used by TS. In all other cases typescript compiler will not use the tslib code but add them on top of each js file when needed. |
hey, @HolgerJeromin, you are obviously correct. My point is that I only understood what was going on after re-reading the documentation for importHelpers. Unfortunately, the problem started after removing a package unrelated to As Npm provides a standard way to ensure packages are present on runtime, using documentation to state "You will need to ensure that the Again, I'd expect all code related to TS-JS transpiling to be injected by @orta, if you'd think it is correct, please, tag this as a suggestion for improvement. |
I think this is related to microsoft/TypeScript#37991 |
It was a surprise for me I was using
tslib
indirectly, due to an dependency of another package. When I removed this package, the compilation ceased to build my solution and it took me some time to understand what was going on.I would expect
tslib
to be installed together withtsc
. On the case this separation makes sense, though, I thinktsc
could declare it as a peerDependencies, so this would be clearer.The text was updated successfully, but these errors were encountered: