Function promisify

  • Converts a function that expects a node-style callback argument like (err, result) to return a Promise instead.

    Returns

    A function that wraps fun and returns a Promise.

    Type Parameters

    • T

    Parameters

    • fun: Function<any>

      The given function to convert from callback style to Promise.

    • Optional thisArg: any

    Returns Function<Promise<T>>

Generated using TypeDoc