import type { AwarenessEvent } from "./events.js";
export declare function on<T extends AwarenessEvent["type"]>(eventType: T, handler: (payload: Extract<AwarenessEvent, {
    type: T;
}>["payload"]) => void | Promise<void>): () => void;
export declare function once<T extends AwarenessEvent["type"]>(eventType: T, handler: (payload: Extract<AwarenessEvent, {
    type: T;
}>["payload"]) => void | Promise<void>): () => void;
export declare function emit(event: AwarenessEvent): Promise<void>;
export declare function getStats(): {
    registeredHandlers: number;
    emittedEvents: number;
};
export declare function clearHandlers(): void;
