/** * detectCircular — Dev-mode circular reference detection for scope values. * * Checks if a value contains circular references using a WeakSet traversal. * O(n) where n = total nested objects. Uses WeakSet so no memory leak. * * Gated by the caller — only called in dev mode to avoid production overhead. * Same approach as Immer (detect and warn at runtime). */ /** * Returns true if the value contains circular references. * Only checks plain objects and arrays — class instances, Date, Map, etc. are skipped. */ export declare function hasCircularReference(value: unknown, ancestors?: WeakSet): boolean; /** * Enable dev-mode diagnostics across the whole library. * * When on, the library performs developer-only checks (circular references, * empty recorder detection, suspicious predicate shapes, etc.) and emits * `console.warn` messages to help you catch mistakes early. * * Call once at application startup. See the module header for the full * list of what dev-mode gates. * * @example * ```ts * import { enableDevMode } from 'footprintjs'; * if (process.env.NODE_ENV !== 'production') enableDevMode(); * ``` */ export declare function enableDevMode(): void; /** * Disable dev-mode diagnostics across the whole library (default state). * * All dev-only checks become no-ops. Safe to call in production paths — * typically the default never needs to be re-asserted, but this is the * documented way to turn the flag off if your code enabled it earlier. */ export declare function disableDevMode(): void; /** * Returns whether dev-mode diagnostics are currently enabled. * * Library internals call this before running any dev-only check. Consumers * rarely need to call it directly — prefer `enableDevMode()` at startup and * let the library gate its own diagnostics internally. */ export declare function isDevMode(): boolean;