Currently, the type inference of the nonEmptyArray method is value is unknown[].
On the other hand, a nonEmptyArray Type can be expressed in the same way as [unknown, ...unknown[]].
So what if we replace the type inference of the nonEmptyArray method with value is [unknown, ...unknown[]] ?
Currently, the type inference of the nonEmptyArray method is
value is unknown[]
. On the other hand, a nonEmptyArray Type can be expressed in the same way as[unknown, ...unknown[]]
. So what if we replace the type inference of the nonEmptyArray method withvalue is [unknown, ...unknown[]]
?