Type alias RemoveThisParam<T>

RemoveThisParam<T>: T extends ((this, ...args) => infer R)
    ? ((...args) => R)
    : T

Utility type shifting the first this parameter of a function.

Type Parameters

  • T

Example

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

Generated using TypeDoc