/** * Service worker lifecycle management for Motor WASM */ import type { ServiceWorkerStatus, EnvironmentInfo } from './types.js'; /** * Detects the current environment capabilities */ export declare function detectEnvironment(): EnvironmentInfo; /** * Registers the Motor service worker */ export declare function registerMotorServiceWorker(workerUrl: string, options?: RegistrationOptions): Promise; /** * Unregisters the Motor service worker */ export declare function unregisterMotorServiceWorker(): Promise; /** * Gets the current Motor service worker status */ export declare function getMotorServiceWorkerStatus(): Promise; /** * Configuration for MotorServiceWorkerManager */ export interface MotorServiceWorkerManagerConfig { worker_script: string; scope?: string; debug?: boolean; type?: WorkerType; updateViaCache?: ServiceWorkerUpdateViaCache; } /** * Service Worker Manager class for advanced lifecycle management */ export declare class MotorServiceWorkerManager { private registration?; private config; private updateCheckInterval?; private debug; constructor(config: MotorServiceWorkerManagerConfig); /** * Checks if service workers are supported in the current environment */ static isSupported(): boolean; /** * Detects the current environment capabilities */ static detectEnvironment(): EnvironmentInfo; /** * Gets browser compatibility information */ static getBrowserCompatibility(): { compatible: boolean; issues: string[]; recommendations: string[]; }; /** * Registers and initializes the service worker */ register(): Promise; /** * Unregisters the service worker */ unregister(): Promise; /** * Checks for service worker updates */ checkForUpdates(): Promise; /** * Gets the current status */ getStatus(): Promise; /** * Sends a message to the service worker */ sendMessage(message: any): Promise; /** * Starts periodic update checking */ private startUpdateChecking; /** * Stops periodic update checking */ private stopUpdateChecking; /** * Attaches event listeners for service worker events */ private attachEventListeners; } /** * Gets or creates the default service worker manager */ export declare function getDefaultServiceWorkerManager(config?: MotorServiceWorkerManagerConfig): MotorServiceWorkerManager; /** * Waits for the service worker to be ready */ export declare function waitForServiceWorker(timeoutMs?: number): Promise; //# sourceMappingURL=worker.d.ts.map