/** * Test-only state and helpers for the engine cleanup-interval finalizer * leak-warning system. Kept in a sibling module so `index.ts` does not * accumulate test-only ceremony. */ export type EngineCleanupIntervalDisposalTracker = { disposed: boolean; cleanupInterval: ReturnType | null; /** * The optional second-instance detector interval, tracked alongside the * cleanup interval so the same finalizer clears it when an engine is * garbage-collected without `[Symbol.dispose]()`. Null when detection is off. */ secondInstanceDetectionInterval: ReturnType | null; testToken: symbol | undefined; }; export declare const engineCleanupIntervalFinalizer: FinalizationRegistry; /** Test-only hook for the finalizer callback's synchronous warning gate. */ export declare function finalizeEngineCleanupIntervalTrackerForTesting(tracker: EngineCleanupIntervalDisposalTracker): void; export declare function shouldEmitEngineLeakWarning(): boolean; /** Test-only override for the engine leak-warning environment gate. */ export declare function setEngineLeakWarningOverrideForTesting(value: boolean | undefined): void; /** Test-only marker applied to the next constructed engine leak tracker. */ export declare function setNextEngineLeakWarningTokenForTesting(value: symbol | undefined): void; /** Read the test-only next-token marker, consuming it. */ export declare function consumeNextEngineLeakWarningTokenForTesting(): symbol | undefined; /** Test-only count of engine cleanup finalizer observations. */ export declare function getEngineLeakCollectionCountForTesting(): number; /** Test-only visibility into whether a tagged engine leak emitted a warning. */ export declare function hasEngineLeakWarningTokenForTesting(token: symbol): boolean; /** Test-only cleanup for tagged leak warning observations. */ export declare function clearEngineLeakWarningTokenForTesting(token: symbol): void; /** Test-only visibility into the engine leak-warning environment gate. */ export declare function shouldEmitEngineLeakWarningForTesting(): boolean;