@featurevisor/sdk
Version:
Featurevisor SDK for Node.js and the browser
13 lines (12 loc) • 437 B
TypeScript
export type EventName = "ready" | "refresh" | "update" | "activation";
export interface Listeners {
[key: string]: Function[];
}
export declare class Emitter {
private _listeners;
constructor();
addListener(eventName: EventName, fn: Function): void;
removeListener(eventName: EventName, fn: Function): void;
removeAllListeners(eventName?: EventName): void;
emit(eventName: EventName, ...args: any[]): void;
}