Closed deiga closed 5 months ago
Txs for spotting this. I did merge it to master
, but I need to add more changes before making a release. I will update once release is made.
I added the comment about 0 length, but the change that will be in next version is a bit different. Still, the end result is the same:
it('empty array', () => {
const list = [] as const
head(emptyList) // $ExpectType undefined
head(list) // $ExpectType undefined
last(emptyList) // $ExpectType undefined
last(list) // $ExpectType undefined
})
I will inform when it is released.
It is released with latest version
last
would returnundefined
if input is an array of length 0, but this is not reflected in the type definition