/** * Shutdown helper functions extracted from ServerStatsProvider. */ /** Timer references that need to be cleared on shutdown. */ export interface TimerRefs { intervalId: ReturnType | null; flushTimer: ReturnType | null; dashboardBroadcastTimer: ReturnType | null; debugBroadcastTimer: ReturnType | null; } /** * Clear all active timers and null out the references. * Returns the (now-nulled) timer refs for convenience. */ export declare function clearAllTimers(timers: TimerRefs): TimerRefs; /** Minimal interface for debug store persistence. */ interface Persistable { saveToDisk(path: string): Promise; } /** * Persist debug data to disk. Logs a warning on failure. */ export declare function persistDebugData(store: Persistable | null, path: string | null): Promise; /** * Unsubscribe from the Redis email bridge channel. * Returns null so callers can clear their reference in one step. */ export declare function unsubscribeEmailBridge(redis: unknown, channel: string): null; /** Stoppable service interface. */ interface Stoppable { stop(): void | Promise; } /** * Clean up log stream, dashboard, and middleware resources. */ export declare function cleanupResources(deps: { logStreamService: Stoppable | null; dashboardLogStream: Stoppable | null; dashboardStore: Stoppable | null; debugStore: Stoppable | null; engine: Stoppable | null; }): Promise; export {};