refactor: use interfaces for AsyncEventEmitter event maps (#10044)

* refactor: use interfaces for AsyncEventEmitter event maps

* refactor: apply suggestions from code review and add tests

* refactor: better errors on missing dispatch types
This commit is contained in:
Qjuh
2023-12-14 17:09:13 +01:00
committed by GitHub
parent f2138bb5a8
commit adfd9cd3b3
11 changed files with 102 additions and 66 deletions

View File

@@ -14,9 +14,7 @@ export interface RestEvents {
restDebug: [info: string];
}
export type RestEventsMap = {
[K in keyof RestEvents]: RestEvents[K];
};
export interface RestEventsMap extends RestEvents {}
/**
* Options to be passed when creating the REST instance