import { z } from 'zod'; import type { AnyOfSchema, Schema } from '../../../../schema/index.js'; import type { Overwrite } from '../../../../types/overwrite.js'; import type { WithValidate } from '../utils.js'; import type { SchemaZodFormatter } from './schema.js'; import type { ZodFormatterOptions } from './types.js'; import type { WithOptional } from './utils.js'; export type AnyOfZodFormatter = AnyOfSchema extends SCHEMA ? z.ZodTypeAny : WithOptional>> : SCHEMA['elements'] extends [infer SCHEMAS_HEAD, ...infer SCHEMAS_TAIL] ? SCHEMAS_HEAD extends Schema ? SCHEMAS_TAIL extends Schema[] ? z.ZodUnion<[ SchemaZodFormatter>, ...MapAnyOfZodFormatter> ]> : never : never : z.ZodTypeAny>>; type MapAnyOfZodFormatter = SCHEMAS extends [infer SCHEMAS_HEAD, ...infer SCHEMAS_TAIL] ? SCHEMAS_HEAD extends Schema ? SCHEMAS_TAIL extends Schema[] ? MapAnyOfZodFormatter ]> : never : never : RESULTS; export declare const anyOfZodFormatter: (schema: AnyOfSchema, options?: ZodFormatterOptions) => z.ZodTypeAny; export {};