AsyncMethodReturns<T>: {
    [K in ExtractKeys<T, Function | object>]: T[K] extends ((...args) => PromiseLike<any>)
        ? T[K]
        : T[K] extends ((...args) => infer R)
            ? ((...args) => Promise<R>)
            : AsyncMethodReturns<T[K]>
}

A mapped type to recursively convert non async methods into async methods and exclude any non function properties from T.

Type Parameters

  • T

Generated using TypeDoc