@graphty/graphty-element / config / toZodSchema
Function: toZodSchema()
toZodSchema<
S>(optionsSchema):ZodObject<{ [K in string | number | symbol]: S[K]["schema"] }>
Defined in: src/config/OptionsSchema.ts:101
Extract just the Zod object schema for validation
This creates a z.object() from the individual field schemas, allowing standard Zod parsing/validation.
Type Parameters
S
S extends OptionsSchema
Parameters
optionsSchema
S
Options schema to convert
Returns
ZodObject<{ [K in string | number | symbol]: S[K]["schema"] }>
Zod object schema for validation