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
NonEmptyArray<A> is not assignable to [A, ...A[]].
Expected behavior
One should be able to use NonEmptyArray (and ReadonlyNonEmptyArray) with functions using the open-ended tuple syntax for their type constraints.
Reproducible example
import{NonEmptyArray,of}from'fp-ts/lib/NonEmptyArray';constfoo=(arr: [unknown, ...unknown[]])=>arr;foo(of(0));// ~~~~~// Argument of type 'NonEmptyArray<number>' is not assignable// to parameter of type '[unknown, ...unknown[]]'
🐛 Bug report
Current Behavior
NonEmptyArray<A>
is not assignable to[A, ...A[]]
.Expected behavior
One should be able to use
NonEmptyArray
(andReadonlyNonEmptyArray
) with functions using the open-ended tuple syntax for their type constraints.Reproducible example
playground
Suggested solution(s)
Your environment
Which versions of fp-ts are affected by this issue? Did this work in previous versions of fp-ts?
NonEmptyArray2v
was introduced in 1.15.0The text was updated successfully, but these errors were encountered: