devtypes - v1.1.0
    Preparing search index...

    Type Alias OmitThisParameter<F>

    OmitThisParameter: F extends (this: any, ...args: infer A) => infer R
        ? (...args: A) => R
        : F

    Remove the this parameter from a function.

    Type Parameters

    • F extends Function

      Function type to modify

    1.1.0

    Produces a new function type without the this binding.

    type Fn = ( this: { x: number }, y: string ) => void;
    type WithoutThis = OmitThisParameter< Fn >; // ( y: string ) => void