4 ms·
Oh so there is an overload! filter<U extends T>(pred: (a: T) => a is U): U[]; Additionally, getting TS better at inferring type guards is an open issue (liter
by amitport 5y ago
Oh so there is an overload!
filter<U extends T>(pred: (a: T) => a is U): U[];
Additionally, getting TS better at inferring type guards is an open issue (literally): https://github.com/microsoft/TypeScript/issues/38390 https://github.com/microsoft/TypeScript/issues/38390