-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Correct and simplify core typed array typings #47503
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
Conversation
For reference: some of the changes in this PR seem to overlap with #47278 |
Note for reviewers: I did find this causes Node's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to keep working on this change, I'll start running Definitely Typed tests after all the baseline tests pass.
} | ||
|
||
interface Int8ArrayConstructor { | ||
new (elements: Iterable<number>): Int8Array; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run tests, I see a lot of failures because these constructors are no longer available. How are they supposed to be made available after this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. I'll re-add them.
I've since gotten WSL hooked up, so I should be able to run the tests before pushing my update.
Edit: I also almost forgot about this PR. 😅
To help with PR housekeeping, I'm going to close this PR since it's pretty old now. |
Fixes #45198 #15402 #45199 #38665 and makes fixes for a number of other typed array typings issues a lot easier. May also reduce memory usage somewhat for apps not using the DOM typings.
This also makes a few other assorted fixes, like with the final parameter to methods like
.find
and.map
, to align better with the spec.This only touches typings. I ran into errors with paths being too long (it's not even all that heavily nested), so I wasn't able to run tests. (I created this using a sparse checkout to work around that, and so I'm also relying on CI here to check my work.)