import type { JsonValue } from 'type-fest';
import { z } from 'zod';
interface ErrorContext<T> {
    error: z.ZodError;
    input: T;
}
interface LooseOpts<T> {
    onError?: (err: ErrorContext<T>) => void;
}
/**
 * Works like `z.array()`, but drops wrong elements instead of invalidating the whole array.
 *
 * **Important**: non-array inputs are still invalid.
 * Use `LooseArray(...).catch([])` to handle it.
 *
 * @param Elem Schema for array elements
 * @param onError Callback for errors
 * @returns Schema for array
 */
export declare function LooseArray<Schema extends z.ZodTypeAny>(Elem: Schema, { onError }?: LooseOpts<unknown[]>): z.ZodEffects<z.ZodArray<z.ZodAny, 'many'>, z.TypeOf<Schema>[], any[]>;
/**
 * Works like `z.record()`, but drops wrong elements instead of invalidating the whole record.
 *
 * **Important**: non-record inputs other are still invalid.
 * Use `LooseRecord(...).catch({})` to handle it.
 *
 * @param Elem Schema for record values
 * @param onError Callback for errors
 * @returns Schema for record
 */
export declare function LooseRecord<Schema extends z.ZodTypeAny>(Elem: Schema, { onError }?: LooseOpts<Record<string, unknown>>): z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodAny>, Record<string, z.TypeOf<Schema>>, Record<string, any>>;
export declare const Json: z.ZodEffects<z.ZodString, string | number | boolean | import("type-fest").JsonObject | JsonValue[] | readonly JsonValue[] | null, string>;
export declare const Json5: z.ZodEffects<z.ZodString, string | number | boolean | import("type-fest").JsonObject | JsonValue[] | readonly JsonValue[] | null, string>;
export {};
