@cloudgpt/timeline-editor
Version:
Enhanced React timeline editor with advanced features including theme system, max duration controls, cursor customization, handle styling, and media support for video editing applications.
17 lines (16 loc) • 587 B
TypeScript
import { Events } from './events';
/**
* 事件派发器
*/
export declare class Emitter<EventTypes> {
events: {
[key: string]: CallableFunction[];
};
constructor(events: Events);
on<K extends keyof EventTypes>(names: K | K[], handler: (args: EventTypes[K]) => boolean | unknown): this;
trigger<K extends keyof EventTypes>(name: K, params: EventTypes[K]): boolean;
bind(name: string): void;
exist(name: string): boolean;
off<K extends keyof EventTypes>(name: K, handler?: (args: EventTypes[K]) => boolean | unknown): void;
offAll(): void;
}