# Class TypeMismatchError

This error indicates that the given input could not be recognized as the type it was supposed to be.

#### Hierarchy

- Error
  - TypeMismatchError

- Defined in codec/lib/wrap/errors.ts:52

#####
Index

### Constructors

constructor

### Properties

dataType
input
reason
specificity
variableName

## Constructors

### constructor

- new TypeMismatchError(dataType, input, variableName, specificity, reason): TypeMismatchError

- #### Parameters

  - ##### dataType: Type

  - ##### input: any

  - ##### variableName: string

  - ##### specificity: number

  - ##### reason: string

  #### Returns TypeMismatchError

  Overrides Error.constructor

  - Defined in codec/lib/wrap/errors.ts:77

## Properties

### dataType

dataType: Type

- Defined in codec/lib/wrap/errors.ts:55

### input

input: any

- Defined in codec/lib/wrap/errors.ts:56

### reason

reason: string

- Defined in codec/lib/wrap/errors.ts:54

### specificity

specificity: number

Specificity is used to determine which error to display; the error with the highest specificity will be used.

Specificity 0: Only for use by the dispatcher

Specificity 1: The user shouldn't see this

Specificity 2: For always-error fallbacks

Specificity 3: For failure to get a good response on yielding

Specificity 4: More specific errors thrown from a semi-generic case

Specificity 5: Specific errors thrown from specific cases

Specificity 6: For one specific error that could use it :P

- Defined in codec/lib/wrap/errors.ts:75

### variableName

variableName: string

- Defined in codec/lib/wrap/errors.ts:53

Generated using TypeDoc