import { type PresenceSnapshot, type RealtimeEvent, type RealtimeLimits, type RealtimeTopic } from "./events.js"; import { type PresenceConnection, type PubSub, type RealtimeSubscriber, type Unsubscribe } from "./pubsub.js"; export interface SubscriberErrorContext { readonly topic: RealtimeTopic; readonly event: RealtimeEvent; } export interface LocalPubSubOptions { readonly clock?: () => number; readonly limits?: Partial; readonly presenceTtlMs?: number; readonly onSubscriberError?: (error: unknown, context: SubscriberErrorContext) => void | Promise; } /** In-memory, process-local pubsub. All state disappears on close or restart. */ export declare class LocalPubSub implements PubSub { private readonly clock; private readonly limits; private readonly presenceTtlMs; private readonly onSubscriberError?; private readonly subscribers; private readonly connections; private readonly connectionsByUser; private readonly lastActivityByUser; private readonly lastOfflineEventByUser; private readonly presenceTimers; private closed; constructor(options?: LocalPubSubOptions); publish(topic: RealtimeTopic, event: RealtimeEvent): Promise; subscribe(topic: RealtimeTopic, subscriber: RealtimeSubscriber): Unsubscribe; connectPresence(connection: PresenceConnection): Promise; recordPresenceActivity(connectionId: string, occurredAt?: number): Promise; disconnectPresence(connectionId: string, occurredAt?: number): Promise; getPresenceSnapshot(userIds?: readonly string[]): Promise; close(): Promise; private emitPresence; private snapshot; private rememberActivity; private schedulePresenceExpiry; private occurredAt; private assertOpen; private reportSubscriberError; } //# sourceMappingURL=local.d.ts.map