A predicate with a type argument other than unknown cannot be piped to Array's dropLeftWhile in 2.11.
declare const f: Predicate<string>
// works
A.dropLeftWhile(f)
// doesn't work
pipe(f, A.dropLeftWhile)
Argument of type 'Predicate<string>' is not assignable to parameter of type 'Predicate<unknown>'.
Types of parameters 'a' and 'a' are incompatible.
Type 'unknown' is not assignable to type 'string'.
Expected behavior
It should probably typecheck. The above is a minimal repro, but the actual issue I've encountered is that fp-ts-std/String::dropLeftWhile no longer typechecks following an upgrade to fp-ts 2.11, where it worked in 2.10. This is the only issue I've encountered in that project but if this is deemed a regression it's possible it affects other functions as well.
🐛 Bug report
fp-ts: 2.11.0 TypeScript: 4.3.5
Current Behavior
A predicate with a type argument other than
unknown
cannot be piped to Array's dropLeftWhile in 2.11.Expected behavior
It should probably typecheck. The above is a minimal repro, but the actual issue I've encountered is that fp-ts-std/String::dropLeftWhile no longer typechecks following an upgrade to fp-ts 2.11, where it worked in 2.10. This is the only issue I've encountered in that project but if this is deemed a regression it's possible it affects other functions as well.