refacto : cleaning the codebasebase again

This commit is contained in:
Tom Boullay
2026-04-19 16:50:11 +02:00
parent 1c48441535
commit 0f96b5597b
26 changed files with 127 additions and 5726 deletions
-3
View File
@@ -1,8 +1,5 @@
type Listener<TPayload> = (payload: TPayload) => void;
// TypeScript cannot narrow mapped-type indexed access by a generic key TKey
// (microsoft/TypeScript#30581). The helper below encapsulates the one necessary
// cast so the rest of the class stays cast-free.
type ListenerMap<TEvents extends Record<string, unknown>> = {
[TKey in keyof TEvents]?: Set<Listener<TEvents[TKey]>>;
};