file-lane
Version:
File conversion tool, can be one-to-one, one to N, N to one
10 lines (9 loc) • 363 B
TypeScript
import DataEvent from './asyncEvent/DataEvent';
interface IEventDispatcher<F extends Function = Function> {
addEventListener(type: string, handler: F): void;
removeEventListener(type: string, handler: F): void;
removeAllListener(type: string): void;
dispatch(event: DataEvent): Promise<void>;
clear(): void;
}
export default IEventDispatcher;