-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add 'tslib.umd.js' to avoid global pollution #52
base: main
Are you sure you want to change the base?
Conversation
This also paves the way for the possibility of supporting #33 as the generator script can be easily modified to emit each helper into its own file (current progress can be seen in https://github.com/Microsoft/tslib/tree/oneHelperPerFile). |
56cd0e2
to
f7d19b5
Compare
I've updated this to support multiple variants:
|
@DanielRosenwasser If we end up taking this, should I also emit a copy of |
Any action on this, global window pollution is a real problem |
Any news on this? |
This adds a tslib.cjs.js file as the package main to reduce the impact of global variable pollution, as well as some additional variants. Also, in an effort to avoid redundancy between each variant, this adds a script to generate all files from a single source.
This also leaves tslib.js as is as it still has a use case to support both
--importHelpers
for modules and scripts (which depend on the helpers being available as globals).Fixes: #32