Function promisify

  • Convert callback-style to promise-style If this is applied to overloaded function it will only choose one of the function signatures to use

    Type Parameters

    • T extends unknown[]

    • P extends unknown[]

    • R extends unknown[]

    Parameters

    • f: ((...args: [...params: P[], callback: Callback<T, any, Error>]) => unknown)
        • (...args: [...params: P[], callback: Callback<T, any, Error>]): unknown
        • Parameters

          • Rest ...args: [...params: P[], callback: Callback<T, any, Error>]

          Returns unknown

    Returns ((...params: P) => Promise<R>)

      • (...params: P): Promise<R>
      • Parameters

        • Rest ...params: P

        Returns Promise<R>

Generated using TypeDoc