import { DefaultContext, Plugin } from '@envelop/types'; import { SerializableGraphQLErrorLike } from './use-masked-errors.js'; export type ErrorHandler = ({ errors, context, phase, }: { errors: readonly Error[] | readonly SerializableGraphQLErrorLike[]; context: Readonly; phase: 'parse' | 'validate' | 'context' | 'execution'; }) => void; export declare const useErrorHandler: >(errorHandler: ErrorHandler) => Plugin;