Type alias EventBus<EventMap>
EventBus<EventMap>: {
dispatch<Name>(context, name, event) => void;
off<Name>(name, listener) => void;
on<Name>(name, listener) => void;
}
Type Parameters
-
EventMap extends {
[key: string]: object;
}
Type declaration
-
dispatch:function
- dispatch<Name>(context, name, event): void
-
Type Parameters
-
Name extends string | number | symbol
Parameters
-
-
name: Name
-
event: Omit<EventMap[Name], "type" | "timestamp"> & Partial<EventBase>
Returns void
-
off:function
- off<Name>(name, listener): void
-
Type Parameters
-
Name extends string | number | symbol
Returns void
-
on:function
- on<Name>(name, listener): void
-
Type Parameters
-
Name extends string | number | symbol
Returns void