Function asPromise

  • Wraps a function that takes a callback as its last parameter and returns a Promise.

    Type Parameters

    • T


    • fn: Function

      the function to wrap

    • context: any

      the parent property of the function f.e. for

    • Rest ...args: any[]

      the arguments to pass to the function

    Returns Promise<T>

    a Promise that resolves with the callback response

Generated using TypeDoc