Function asPromise

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

    Type Parameters

    • T

    Parameters

    • fn: Function

      the function to wrap

    • context: any

      the parent property of the function f.e. formContext.data.process for formContext.data.process.getEnabledProcesses

    • Rest ...args: any[]

      the arguments to pass to the function

    Returns Promise<T>

    a Promise that resolves with the callback response

Generated using TypeDoc