API reference / @evolu/common / Type / ObjectWithRecordError
Interface: ObjectWithRecordError<PropsErrors, KeyError, ValueError>
Defined in: packages/common/src/Type.ts:2879
Extends
TypeErrorWithReason
<"ObjectWithRecord"
, | {kind
:"NotObject"
; } | {errors
:Partial
<PropsErrors
>;kind
:"Props"
; } | {error
:KeyError
;key
:unknown
;kind
:"IndexKey"
; } | {error
:ValueError
;key
:string
;kind
:"IndexValue"
; }>
Type Parameters
Type Parameter | Default type |
---|---|
PropsErrors extends Record <string , TypeError > | Record <string , TypeError > |
KeyError extends TypeError | TypeError |
ValueError extends TypeError | TypeError |
Properties
Property | Modifier | Type | Description | Inherited from | Defined in |
---|---|---|---|---|---|
reason | readonly | | { kind : "NotObject" ; } | { errors : Partial <PropsErrors >; kind : "Props" ; } | { error : KeyError ; key : unknown ; kind : "IndexKey" ; } | { error : ValueError ; key : string ; kind : "IndexValue" ; } | The detailed reason for the error, represented as a tagged union. | TypeErrorWithReason .reason | packages/common/src/Type.ts:261 |
type | readonly | "ObjectWithRecord" | - | TypeErrorWithReason .type | packages/common/src/Type.ts:245 |
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:251 |