@wdio/browserstack-service
Version:
WebdriverIO service for better Browserstack integration
28 lines • 846 B
TypeScript
/**
* EventDispatcher - Singleton class for event handling
*/
declare class EventDispatcher {
#private;
observers: Record<string, Function[]>;
constructor();
/**
* Get the EventDispatcher singleton instance
* @returns {EventDispatcher} The singleton instance
*/
static getInstance(): EventDispatcher;
/**
* Add event observer
* @param {string} event - Event name
* @param {Function} callback - Callback function
*/
registerObserver(hookRegistryKey: string, callback: Function): void;
/**
* Notify registered observers on an event
* @param {string} event - Event name
* @param {*} data - Event data
*/
notifyObserver(event: string, args: unknown): Promise<void>;
}
export declare const eventDispatcher: EventDispatcher;
export {};
//# sourceMappingURL=eventDispatcher.d.ts.map