@graphty/graphty-element / catalog / optionsFromZod
Function: optionsFromZod() ​
optionsFromZod(
schema,options?): readonlyOptionDescriptor[]
Defined in: graphty-element/src/catalog/optionsFromZod.ts:106
Turn a Zod option schema into plain-JSON option descriptors.
Parameters ​
schema ​
A Zod object schema, or the element's options schema of Zod schemas paired with UI metadata.
options? ​
Metadata and per-option overrides the schema cannot express.
Returns ​
readonly OptionDescriptor[]
One descriptor per option, in the order the schema declares them.