Function arrayFromZodSchema

  • Experimental

    Converts a Zod schema into an array of objects.

    Type Parameters

    • S extends AnyZodObject

    Parameters

    • schema: S

    Returns {
        error: Error;
        value?: undefined;
    } | {
        error?: undefined;
        value: {
            default: any;
            description: string;
            key: string;
        }[];
    }