API reference / @evolu/common / Type / typeErrorToStandardSchemaIssues

Function: typeErrorToStandardSchemaIssues()

function typeErrorToStandardSchemaIssues<ExtraErrors>(
  error,
  formatTypeError,
  path,
): readonly Issue[];

Defined in: packages/common/src/Type.ts:4093

Converts an Evolu TypeError to Standard Schema V1 issues format.

This function recursively converts Evolu's typed errors into the Standard Schema issue format with proper path tracking for nested structures.

Type Parameters

Type ParameterDefault type
ExtraErrors extends TypeError<Capitalize<string>>never

Parameters

ParameterTypeDefault value
errorTypeErrors<ExtraErrors>undefined
formatTypeErrorTypeErrorFormatter<TypeErrors<ExtraErrors>>undefined
pathreadonly PropertyKey[][]

Returns

readonly Issue[]

Was this page helpful?