-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Proposal: Change native lib instead #53
Comments
I'm open to it as long as it's clearly documented that it should not be used in packaged. |
Do you mean declaration merging? Maybe we can add a {
"compilerOptions": {
"typeRoots": ["./node_modules/ts-extras/global.d.ts"]
}
} |
That's right. However I'm not entirely sure it can be loaded "as a whole" because maybe not all types are desired + it would cause more breaking releases. Having to import specific "fixes" would be best, like Object.entries and Array#includes |
Seems verbose and annoying to import individual types for this though. Maybe we start by exporting all and see if it causes any problems? We would document that those types do not follow semver and need to be pinned. |
It's literally less verbose than the current situation though 😃 Import object.entries once per project vs once per file. I'm ok with the global to start though |
Note, overwriting |
Found a WIP library that does this by default: |
I'm hesitant to use this library as is because to a new developer this looks unnecessary:
and will likely attempt to change it to:
which may even pass the tests and continue being less strict.
What do you think about offering additional entry points to change the global lib instead? I do this pattern to make some Promise types stricter for example: microsoft/TypeScript#45602 (comment)
The text was updated successfully, but these errors were encountered: