replay-viewer
Version:
Rocket League replay viewer React component and tooling
17 lines (16 loc) • 664 B
TypeScript
declare type Callback<A> = (arg: A) => void;
declare class EventBus {
private readonly listeners;
constructor();
buildEvent<EventBusArg>(type: string, scope?: any): {
addEventListener: (callback: Callback<EventBusArg>) => void;
removeEventListener: (callback: Callback<EventBusArg>) => void;
dispatch: (args: EventBusArg) => void;
};
addEventListener<A>(type: string, callback: Callback<A>, scope?: any): void;
removeEventListener<A>(type: string, callback: Callback<A>, scope?: any): void;
dispatch<A>(type: string, arg: A): void;
reset(): void;
}
declare const _default: EventBus;
export default _default;