UNPKG

ts-toolbelt

Version:

TypeScript's largest utility library

11 lines (10 loc) 285 B
import { List } from './List'; /** * Remove the last element out of `L` * @param L to remove from * @returns [[List]] * @example * ```ts * ``` */ export declare type Pop<L extends List> = L extends (readonly [...infer LBody, any] | readonly [...infer LBody, any?]) ? LBody : L;