New Features
-
Now takes TypeScript type guards into account when using
filter
,remove
,takeWhile
, andfind
. For example,function isNumber(x: unknown): x is number { return typeof x === "number"; } chainFrom(["a", 1, "b", 2]) .filter(isNumber) .toArray(); // Return type inferred as number[], previously (string | number)[].
Thanks to @icehaunter for the suggestion!