You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when filtering using any other method it does not give back the correct type
const myFilteredArray = myArray.filter(Number.isNaN)
// ^? (number | undefined)[]
// Below might be impossible, but would be sick if ts can do this
function myCustomFilter(input?: number) {
return input !== undefined
}
const myFilteredArray = myArray.filter(myCustomFilter)
// ^? (number | undefined)[]
The text was updated successfully, but these errors were encountered:
I am not sure if any of this would even be possible.
Given the following array
I can do the following filter using
Boolean
But when filtering using any other method it does not give back the correct type
The text was updated successfully, but these errors were encountered: