Function default

  • It will execute a function with the given arguments, And will return its result or the error it may have thrown.

    Type Parameters

    • TFunc extends AnyFunction

    • TError = any

    Parameters

    • fn: TFunc

      The function which is going to get executed safely.

    • Rest ...args: Parameters<TFunc>

    Returns Result<ReturnType<TFunc>, TError>

    A Result containing the result of fn or the error it may have thrown.

Generated using TypeDoc