rambdax
Version:
Extended version of Rambda - a lightweight, faster alternative to Ramda
16 lines (14 loc) • 296 B
text/typescript
import {_Omit} from './Omit'
import {List} from './List'
/**
Remove the last element out of `L`
@param L to remove from
@returns [[List]]
@example
```ts
```
*/
export type Pop<L extends List> =
L extends (readonly [...infer LBody, any] | readonly [...infer LBody, any?])
? LBody
: L