• function to execute patched function and being able to catch errors

    Type Parameters

    • T

    Parameters

    • execute: () => T

      function to be executed

    • onFinish: (e: undefined | Error, result: undefined | T) => void

      callback to run when execute finishes

    • OptionalpreventThrowingError: boolean

    Returns T