/** * Debug channel — the order-independent handshake between the SDK core and the * optional `@colyseus/sdk/debug` overlay. * * Publishers (a joined room in {@link Client}, a `Predict` instance) call * {@link publishDebug} whenever there's something the overlay could surface. If * the overlay is already loaded it renders immediately; if it loads LATER — the * usual dev-only `import("@colyseus/sdk/debug")` races the first room join — a * lightweight buffering stub captures the publishes so the overlay REPLAYS them * on install. No app-side ordering (awaiting the import) is required, and a * publisher that fires before the overlay loads is never dropped. * * Production (overlay never imported) stays effectively free: the stub is created * only on first publish, holds WeakRefs so nothing is pinned, and is bounded — an * app that never loads the overlay leaks neither memory nor room references. */ /** The receiver `@colyseus/sdk/debug` installs on `globalThis.__colyseusDebug`. */ export interface ColyseusDebugRegistry { publish(channel: string, handle: object): void; } /** * Publish a `handle` to the overlay `channel` (`"room"` | `"predict"` | …). * Prod fast path: one property read, then either a live `publish` (overlay * loaded) or a bounded WeakRef append (buffered for replay on install). */ export declare function publishDebug(channel: string, handle: object): void; /** * True only when the overlay installed its LIVE receiver — NOT when * {@link publishDebug} merely created the pre-load buffer. Diagnostics that must * stay free in production (reconciler drift bookkeeping) gate on this. */ export declare function debugOverlayActive(): boolean;