import { Observable } from "rxjs";
import type { ErrorLike } from "@apollo/client";
import type { FetchResult, NextLink, Operation } from "@apollo/client/link";
import { ApolloLink } from "@apollo/client/link";
export declare namespace ErrorLink {
    /**
     * Callback to be triggered when an error occurs within the link stack.
     */
    interface ErrorHandler {
        (options: ErrorHandlerOptions): Observable<FetchResult> | void;
    }
    interface ErrorHandlerOptions {
        /**
         * Error that caused the callback to be triggered.
         */
        error: ErrorLike;
        result?: FetchResult;
        operation: Operation;
        forward: NextLink;
    }
}
export import ErrorHandler = ErrorLink.ErrorHandler;
/**
 * @deprecated
 * Use `ErrorLink` from `@apollo/client/link/error` instead.
 */
export declare function onError(errorHandler: ErrorHandler): ErrorLink;
export declare class ErrorLink extends ApolloLink {
    constructor(errorHandler: ErrorLink.ErrorHandler);
}
//# sourceMappingURL=index.d.ts.map
