vtils

Home > types > Tail

Tail type

Signature:

export declare type Tail<T extends AnyArray> = T["length"] extends 0
  ? never
  : ((...t: T) => void) extends (first: any, ...rest: infer Rest) => void
  ? Rest
  : never;

References: AnyArray