UNPKG

@wocker/core

Version:
10 lines (9 loc) 346 B
export type EventHandle = (...args: any[]) => Promise<void> | void; export declare class EventService { protected handles: { [event: string]: Set<EventHandle>; }; on(event: string, handle: EventHandle): (() => void); off(event: string, handle: EventHandle): void; emit(event: string, ...args: any[]): Promise<void>; }