export type EventMap = Record; type EventCallback = (...args: TArgs) => void; export declare class EventEmitter = EventMap> { private listeners; /** * 이벤트 리스너를 등록합니다. 스페이스로 구분하여 여러 이벤트를 동시에 등록할 수 있습니다. */ on(event: K, callback: EventCallback): this; on(event: string, callback: EventCallback): this; /** * 이벤트 리스너를 제거합니다. 스페이스로 구분하여 여러 이벤트를 동시에 해제할 수 있습니다. */ off(event: K, callback: EventCallback): this; off(event: string, callback: EventCallback): this; /** * 한 번만 실행되는 이벤트 리스너를 등록합니다. */ once(event: K, callback: EventCallback): this; once(event: string, callback: EventCallback): this; /** * 이벤트를 발행합니다. 스페이스로 구분하여 여러 이벤트를 동시에 발행할 수 있습니다. */ emit(event: K, ...args: TEvents[K] extends any[] ? TEvents[K] : any[]): this; emit(event: string, ...args: any[]): this; } export {};