import { WebSocket } from "ws";
export type WsMiddlewareFn = (ws: WebSocket, data: Buffer | string, next: (err?: Error) => void) => void | Promise<void>;
export declare class WsMiddlewareStack {
    private fns;
    use(fn: WsMiddlewareFn): this;
    attach(ws: WebSocket, onMessage: (data: Buffer | string) => void): void;
    wrapSocket(ws: WebSocket): void;
}
