UNPKG

native-update

Version:

Foundation package for building a comprehensive update system for Capacitor apps. Provides architecture and interfaces but requires backend implementation.

34 lines (33 loc) 849 B
/** * Centralized event emitter for the Native Update plugin */ export declare class EventEmitter { private static instance; private listeners; private constructor(); static getInstance(): EventEmitter; /** * Add a listener for an event */ addListener(eventName: string, listener: (data: unknown) => void): () => void; /** * Emit an event to all listeners */ emit(eventName: string, data: unknown): void; /** * Remove all listeners for a specific event */ removeListeners(eventName: string): void; /** * Remove all listeners */ removeAllListeners(): void; /** * Get the number of listeners for an event */ listenerCount(eventName: string): number; /** * Get all event names that have listeners */ eventNames(): string[]; }