Type Alias TransformMethods<Methods>

TransformMethods<Methods>: {
    [Name in keyof Methods]: Methods[Name] extends ((...args: [...(infer Args), infer Options]) => infer Ret)
        ? ((...args: [...Args, ...MakeOptional<Options>]) => Ret)
        : never
}

Type Parameters

  • Methods extends {
        [key: string]: Function;
    }