mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
refactored mutator to listen for returned data from event listeners
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { type Event, InvalidEventReturn } from "./Event";
|
||||
import { type Event, type EventClass, InvalidEventReturn } from "./Event";
|
||||
import { EventListener, type ListenerHandler, type ListenerMode } from "./EventListener";
|
||||
|
||||
export type RegisterListenerConfig =
|
||||
@@ -12,10 +12,8 @@ export interface EmitsEvents {
|
||||
emgr: EventManager;
|
||||
}
|
||||
|
||||
export type EventClass = {
|
||||
new (params: any): Event<any, any>;
|
||||
slug: string;
|
||||
};
|
||||
// for compatibility, moved it to Event.ts
|
||||
export type { EventClass };
|
||||
|
||||
export class EventManager<
|
||||
RegisteredEvents extends Record<string, EventClass> = Record<string, EventClass>
|
||||
|
||||
Reference in New Issue
Block a user