Function arrayFromZodUnion

  • Experimental

    Converts a Zod union into an array of strings.

    Type Parameters

    • S extends ZodUnion<readonly [ZodTypeAny, ZodTypeAny]>

    Parameters

    • schema: S

    Returns {
        error: Error;
        value?: undefined;
    } | {
        error?: undefined;
        value: string[];
    }