import { type PeerEventMap, type PeerID, type WebRtcDispatchPayload, type HandlerType, type WebRtcConfig } from "./lib/type/web-rtc.js"; import { Snapshot } from "./lib/dto/snapshot.js"; export declare class WebRTC { private connections; private peerId; private peer; private initPromise; private reconnectCount; private maxReconnectCount; private reconnectTimeout; private customHandlers; onUpdateDatabase: (data: WebRtcDispatchPayload) => void; onGetSnapshot: () => Snapshot; onSyncDatabase: (snapshot: Snapshot) => void; constructor(config?: WebRtcConfig); init(): Promise; private handleConnection; private syncDatabase; setHandler(event: K, handler: PeerEventMap[K]): void; handleDisconnect(peerId: PeerID, endDisconnect?: () => void): void; send(data: WebRtcDispatchPayload): void; connect(targetId: PeerID): void; destroy(): void; get connectionsLength(): number; } //# sourceMappingURL=web-rtc.d.ts.map