import type { RouteSchema, Middleware } from '../types/index';
/**
 * createValidationMiddleware:
 * - Precompute a smaller runtime descriptor per method to avoid
 *   repeatedly touching the full schema object on every request.
 * - Uses safeParse (sync) for Zod schemas (no try/catch around safeParse).
 * - Parses querystring manually (no URL constructor, no throw).
 * - Lazily allocates the errors container only when needed.
 * - Avoids unnecessary object allocations for successful paths.
 *
 * @param schema - The route schema to validate the request against.
 * @returns The middleware function that validates the request.
 */
export declare function createValidationMiddleware(schema: RouteSchema): Middleware;
