import type { Socket } from 'socket.io';
import type { AckResponse } from '../events.js';
/**
 * 包装 handler 函数，统一处理错误
 */
export declare function withErrorHandler<T, R>(handler: (socket: Socket, payload: T) => Promise<R>): (socket: Socket, payload: T, callback?: (response: AckResponse<R>) => void) => Promise<void>;
/**
 * 创建带验证的 handler
 */
export declare function createHandler<T, R>(validator: (payload: unknown) => T, handler: (socket: Socket, payload: T) => Promise<R>): (socket: Socket, payload: unknown, callback?: ((response: AckResponse<R>) => void) | undefined) => Promise<void>;
//# sourceMappingURL=error-handler.d.ts.map