Thrown when assertion has failed or a condition thought to be impossible has occurred.

Hierarchy

Constructors

Constructors

  • Creates a new error.

    Parameters

    • Optionalmessage: string

      an explanation of what went wrong

    • Optionaloptions: { cause: unknown }

      configuration options

    Returns AssertionError