Returns a getter function for the default value of a Zod schema, if one is defined. Supports both Zod v3 and v4 schemas. If the schema has a default value, the returned function will return that value when called. If no default is defined, returns undefined.
getInteropZodDefaultGetter<T extends InteropZodType<any, any>>(
schema: T): (
) => InferInteropZodOutput<T> | undefined| Name | Type | Description |
|---|---|---|
schema* | T | The Zod schema instance (either v3 or v4). |