makeFieldSchemaFromZod()
Home > @backstage/plugin-scaffolder
> makeFieldSchemaFromZod
Warning: This API is now obsolete.
use
makeFieldSchema
instead Utility function to convert zod return and UI options schemas to a CustomFieldExtensionSchema with FieldExtensionComponentProps type inference
Signature:
function makeFieldSchemaFromZod<TReturnSchema extends z.ZodType, TUiOptionsSchema extends z.ZodType = z.ZodType<any, any, {}>>(returnSchema: TReturnSchema, uiOptionsSchema?: TUiOptionsSchema): FieldSchema<TReturnSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : never, TUiOptionsSchema extends z.ZodType<any, any, infer IUiOptions> ? IUiOptions : never>;
Parameters
Parameter |
Type |
Description |
---|---|---|
returnSchema |
TReturnSchema | |
uiOptionsSchema |
TUiOptionsSchema |
(Optional) |
FieldSchema<TReturnSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : never, TUiOptionsSchema extends z.ZodType<any, any, infer IUiOptions> ? IUiOptions : never>