mobx-keystone
    Preparing search index...

    Class TypeCheckError

    A type checking error.

    Index

    Constructors

    • Creates a type check error from an object payload.

      Parameters

      Returns TypeCheckError

    • Parameters

      • path: Path

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

      • expectedTypeName: string

        Name of the expected type.

      • actualValue: any

        Actual value.

      • OptionaltypeCheckedValue: any

        The value where the type check was invoked.

      Returns TypeCheckError

      Use the object payload constructor instead for better readability and maintainability.

      Creates a type check error from positional parameters.

    Properties

    actualValue: any
    expectedTypeName: string
    message: string
    modelTrail?: readonly string[]
    path: Path
    typeCheckedValue?: any

    Methods

    • Throws the type check error as an actual error.

      Returns never