This adds a missing overload for filter which will allow us to narrow types, e.g. by applying type conditions. We can now specify narrowing types and still get the desired output without casting:
pipe(
fromArray([false, true, false, true]),
filter((x): x is true => !!x),
forEach(console.log), // always true
);
Resolves #148
This adds a missing overload for
filter
which will allow us to narrow types, e.g. by applying type conditions. We can now specify narrowing types and still get the desired output without casting: