/** * Unwraps Zod wrapper types (optional, nullable, default, catch, etc.) to get the inner type. * * Zod allows chaining modifiers like `.optional().nullable().default()`. * This function recursively unwraps these modifiers to find the core type. * * Includes a depth limit to prevent stack overflow from malformed schemas. * * @param schema - A Zod schema that may be wrapped * @param depth - Current recursion depth (internal use) * @returns The innermost unwrapped Zod type * * @example * const schema = z.object({ x: z.number() }).optional().nullable(); * unwrapZodType(schema); // Returns the ZodObject * * @example * // Deeply chained modifiers * const schema = z.object({ x: z.number() }).optional().nullable().default({ x: 0 }); * unwrapZodType(schema); // Returns the ZodObject */ export declare const unwrapZodType: (schema: unknown, depth?: number) => unknown;