Type alias Shift<T>

Shift<T>: ((...args) => void) extends ((arg, ...rest) => void)
    ? U
    : never

Utility type shifting the first parameter of a function.

Type Parameters

  • T extends any[]

Example

type Foo = (a: string, b: number) => void;
type Bar = Shift<Foo>;
// Bar = (b: number) => void;

Generated using TypeDoc