UNPKG

@rollinsafary/mvc

Version:

Extended mvc design pattern implementation

12 lines (11 loc) 596 B
import { FunctionArgs } from "./general"; type EventType = string | symbol; export declare class EventEmitter { private eventsMap; on<C, A extends FunctionArgs>(eventName: EventType, callback: (...args: A) => void, context?: C, once?: boolean): this; once<C, A extends FunctionArgs>(eventName: EventType, callback: (...args: A) => void, context?: C): this; off<C, A extends FunctionArgs>(eventName: EventType, callback: (...args: A) => void, context?: C): this; emit<A extends FunctionArgs>(eventName: EventType, ...args: A): this; private getEventListeners; } export {};