Class TypeCheckError

A type checking error.

Constructors

  • Creates an instance of TypeError.

    Parameters

    • path: Path

      Sub-path (where the root is the value being type checked) where the error occured.

    • expectedTypeName: string

      Name of the expected type.

    • actualValue: any

      Actual value.

    • OptionaltypeCheckedValue: any

      The value where the type check was invoked.

    Returns TypeCheckError

Properties

actualValue: any

Actual value.

expectedTypeName: string

Name of the expected type.

message: string

The type check error message.

path: Path

Sub-path (where the root is the value being type checked) where the error occured.

typeCheckedValue?: any

The value where the type check was invoked.

Methods

  • Throws the type check error as an actual error.

    Returns never