• Creates a new [TypedError] with the option of inferring the type value from a specific [TypedError].

    Type Parameters

    Parameters

    • type: T["type"]

      the identifier of the error

    • cause: string

      the message that describes the error

    • Optional stack: string

      the trace of the execution stack up until the error origin.

    Returns {
        cause: string;
        stack: undefined | string;
        type: T["type"];
    }

    an object of type [TypedError]

    • cause: string
    • stack: undefined | string
    • type: T["type"]

Generated using TypeDoc