We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const a = [1, '2', 3]; // (number | string)[] const b = a.filter(el => typeof el === 'number') // still (number | string)[], expected number[]
array.filter() should have an overload:
array.filter()
filter(predicate: (el: T, i, arr) => el is R): R[]
The same kind of overload is in rxjs' filter operator.
filter
The text was updated successfully, but these errors were encountered:
Please search. #7657
Sorry, something went wrong.
mea culpa, I thought something seemingly simple as this would either be implemented already or not have an open issue.
No branches or pull requests
array.filter()
should have an overload:The same kind of overload is in rxjs'
filter
operator.The text was updated successfully, but these errors were encountered: