mobx-keystone
    Preparing search index...

    Class TypeCheckError

    A type checking error.

    Index

    Constructors

    • Creates a type check error from an object payload. Prefer the object form; the positional form is kept for backwards compatibility.

      Parameters

      • ...args:
            | [data: TypeCheckErrorData]
            | [
                path: Path,
                expectedTypeName: string,
                actualValue: any,
                typeCheckedValue?: any,
            ]

      Returns TypeCheckError

    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