import type { NextResponse } from "next/server";
import type { Middleware } from "./types";
export interface WithErrorHandlingOptions {
    errorFactory: (error: unknown, options: Omit<WithErrorHandlingOptions, "errorFactory">) => NextResponse;
    errorStatus?: number;
}
export declare const makeDefaultErrorFactory: ({ ResponseObj }: {
    ResponseObj: typeof NextResponse;
}) => (error: unknown, { errorStatus }?: Omit<WithErrorHandlingOptions, "errorFactory">) => NextResponse;
export declare const withErrorHandling: ({ errorFactory, errorStatus }: WithErrorHandlingOptions) => Middleware;
//# sourceMappingURL=withErrorHandling.d.ts.map