API reference / @evolu/common / Type / RecordError
Interface: RecordError<KeyError, ValueError>
Defined in: packages/common/src/Type.ts:2701
Extends
TypeErrorWithReason<"Record", | {kind:"NotRecord"; } | {error:KeyError;key:unknown;kind:"Key"; } | {error:ValueError;key:unknown;kind:"Value"; }>
Type Parameters
| Type Parameter | Default type |
|---|---|
KeyError extends TypeError | TypeError |
ValueError extends TypeError | TypeError |
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
reason | readonly | | { kind: "NotRecord"; } | { error: KeyError; key: unknown; kind: "Key"; } | { error: ValueError; key: unknown; kind: "Value"; } | The detailed reason for the error, represented as a tagged union. | TypeErrorWithReason.reason | packages/common/src/Type.ts:444 |
type | readonly | "Record" | - | TypeErrorWithReason.type | packages/common/src/Type.ts:428 |
value | readonly | unknown | The value that was received and caused the error. Provides additional context for debugging and validation feedback. | TypeErrorWithReason.value | packages/common/src/Type.ts:434 |