sindresorhus / is

Type check values
MIT License
1.68k stars 109 forks source link

add type inference to "nonEmptyArray" #171

Closed mook2-y2 closed 2 years ago

mook2-y2 commented 2 years ago

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[]] ?