Appearance
Variable: createToJSONSchemaMethod()
ts
const createToJSONSchemaMethod: <T>(schema: T, processors?: Record<string, Processor>) => (params?: ToJSONSchemaParams) => ZodStandardJSONSchemaPayload<T>;Defined in: node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts:107
Creates a toJSONSchema method for a schema instance. This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
Type Parameters
| Type Parameter |
|---|
T extends schemas.$ZodType |
Parameters
| Parameter | Type |
|---|---|
schema | T |
processors? | Record<string, Processor> |
Returns
ts
(params?: ToJSONSchemaParams): ZodStandardJSONSchemaPayload<T>;Parameters
| Parameter | Type |
|---|---|
params? | ToJSONSchemaParams |
Returns
ZodStandardJSONSchemaPayload<T>