@diffusionstudio/core-v4
Version:
2D motion graphics and video rendering engine
22 lines (21 loc) • 1.86 kB
TypeScript
export declare function EventEmitter<Events = {}>(): {
new (...args: any[]): {
_handlers: { [T in keyof import('../mixins/event/types').BaseEvents<Events>]?: {
[x: string]: (event: import('../mixins/event/types').EmittedEvent<import('../mixins/event/types').BaseEvents<Events>[T], any>) => void;
} | undefined; };
on<T_1 extends "*" | "error" | keyof Events>(eventType: T_1, callback: (event: import('../mixins/event/types').EmittedEvent<import('../mixins/event/types').BaseEvents<Events>[T_1], /*elided*/ any>) => void): string;
off(id?: string | "*", ...ids: string[]): void;
emit<T_1 extends "*" | "error" | keyof Events>(eventType: T_1, detail: import('../mixins/event/types').BaseEvents<Events>[T_1]): void;
bubble(target: {
_handlers: { [T in keyof import('../mixins/event/types').BaseEvents<Events>]?: {
[x: string]: (event: import('../mixins/event/types').EmittedEvent<import('../mixins/event/types').BaseEvents<Events>[T], any>) => void;
} | undefined; };
on<T_1 extends "*" | "error" | keyof Events>(eventType: T_1, callback: (event: import('../mixins/event/types').EmittedEvent<import('../mixins/event/types').BaseEvents<Events>[T_1], /*elided*/ any>) => void): string;
off(id?: string | "*", ...ids: string[]): void;
emit<T_1 extends "*" | "error" | keyof Events>(eventType: T_1, detail: import('../mixins/event/types').BaseEvents<Events>[T_1]): void;
bubble(target: /*elided*/ any): string;
resolve(eventType: "*" | "error" | keyof Events): (resolve: (value: unknown) => void, reject: (reason?: any) => void) => void;
}): string;
resolve(eventType: "*" | "error" | keyof Events): (resolve: (value: unknown) => void, reject: (reason?: any) => void) => void;
};
};