UNPKG

@gitorial/sync

Version:

Universal sync library for real-time tutorial state synchronization between websites and VS Code extensions with built-in relay server orchestration

40 lines 1.24 kB
import { EventEmitter } from 'events'; import { SessionStore } from '../stores/SessionStore'; import { SessionLifecycleEvents } from '../types/session'; /** * Manages session lifecycle including expiration timers and cleanup */ export declare class SessionLifecycleManager extends EventEmitter { private sessionStore; private cleanupTimer; private cleanupIntervalMs; private isRunning; constructor(sessionStore: SessionStore, cleanupIntervalMs?: number); /** * Start the lifecycle manager */ start(): void; /** * Stop the lifecycle manager */ stop(): void; /** * Check if the lifecycle manager is running */ isActive(): boolean; /** * Manually trigger cleanup of expired sessions */ cleanupExpiredSessions(): number; /** * Start the cleanup timer */ private startCleanupTimer; /** * Stop the cleanup timer */ private stopCleanupTimer; on<K extends keyof SessionLifecycleEvents>(event: K, listener: SessionLifecycleEvents[K]): this; emit<K extends keyof SessionLifecycleEvents>(event: K, ...args: Parameters<SessionLifecycleEvents[K]>): boolean; } //# sourceMappingURL=SessionLifecycleManager.d.ts.map