-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add a type-guard overload of Array.every #38200
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 a type-guard overload of Array.every #38200
Conversation
I've wanted this feature too, but it was pointed out in another issue that However, TS has other unsound narrowings, so maybe this should be a pragmatic exception? I'm not sure. Seems easy enough to wrap if you need it in a more sound way. |
Overall LGTM. Can you fix the merge conflict so we can run some user tests? |
@typescript-bot user test this |
@typescript-bot run dt |
@typescript-bot rwc test this |
@typescript-bot test this |
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
User tests are fine -- we caught vs code during a build break, but otherwise there's nothing there. |
This adds a type-guard aware overload of
Array.every
.Fixes #14963.