Interface CustomErrorConstructor<T>

Defines the definition of the custom error constructor Used by: createCustomError

interface CustomErrorConstructor<T> {
    new CustomErrorConstructornew (message?: string): T;
    new CustomErrorConstructornew (message?: string): Error;
    prototype: T;
    (message?: string): T;
    (message?: string): Error;
}

Type Parameters

  • T extends Error = Error

Hierarchy

  • ErrorConstructor
    • CustomErrorConstructor

Constructors

Properties

Constructors

  • Parameters

    • Optionalmessage: string

    Returns T

  • Parameters

    • Optionalmessage: string

    Returns Error

Properties

prototype: T