Extends or sets the metadata for a given schema.
extend<
TValue,
TUpdate
>(
schema: InteropZodType<TValue>,
predicate: (meta: SchemaMeta<TValue, TUpdate> | undefined) => SchemaMeta<TValue,
TUpdate>
)| Name | Type | Description |
|---|---|---|
schema* | InteropZodType<TValue> | The schema to extend metadata for. |
predicate* | (meta: SchemaMeta<TValue, TUpdate> | undefined) => SchemaMeta<TValue, TUpdate> | A function that receives the existing metadata (or undefined) and returns the new metadata. |