Skip to content
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

Investigate upgrading to tslib v2 #15730

Closed
ecraig12345 opened this issue Oct 27, 2020 · 2 comments
Closed

Investigate upgrading to tslib v2 #15730

ecraig12345 opened this issue Oct 27, 2020 · 2 comments

Comments

@ecraig12345
Copy link
Member

tslib@2 was recently released, and we may want to either upgrade to require that version or optionally add support for it in our dependency range. Need to investigate which TS versions are supported by tslib@2 both while compiling and for consumers and if it's possible to support both 1 and 2 for now.

@ecraig12345
Copy link
Member Author

ecraig12345 commented Feb 18, 2021

Per the tslib docs, the minimum typescript version to use tslib@2 is 3.9. So we can't and shouldn't use it until we internally upgrade to TS 3.9.

Per the tslib 2.0.0 release notes the only breaking change in version 2 is:

This release changes __exportStar and __importStar to use __createBinding which is incompatible with versions of TypeScript older than 3.9 (i.e. 3.8 and below).

Per this PR description:

TypeScript 3.9 won't work on anything older than tslib 2.0

From what I can tell (see this PR comment), the tslib version which must be used is bound to the TS version used to compile the library, not to consume it. So whenever we internally upgrade to TS 4.1, I think we should be able to update to tslib@2 at that time without any affect on consumers (besides a minor bundle size hit).

@ecraig12345
Copy link
Member Author

Closing in favor of #16101 since it turns out this change won't be made until the overall TS 4 upgrade.

@microsoft microsoft locked as resolved and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant