From 9f31394318b2479d1a477e3cfc8315914595b573 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Mon, 20 Nov 2023 14:43:03 +0100 Subject: [PATCH] Name a type for event data Use a named type for the EventData used in subscriptions. This was done as a workaround for a bug in the linter. --- packages/lib/src/subscriptions.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/lib/src/subscriptions.ts b/packages/lib/src/subscriptions.ts index 1f6c149e..eb82e02e 100644 --- a/packages/lib/src/subscriptions.ts +++ b/packages/lib/src/subscriptions.ts @@ -110,15 +110,17 @@ export class SubscriptionRequest { } } +type EventData = { + subscriptionUpdate?: SubscriptionRequestHandler, + subscriptions: Map, onceClose: () => void }>, +}; + /** * A class component to handle incoming subscription requests and offers a method to broadcast events to subscribers * After creation, no other handler can be registered for SubscriptionRequest on the controller */ export class SubscriptionController { - _events = new Map, - subscriptions: Map, onceClose: () => void }>, - }>(); + _events = new Map(); constructor( private controller: any, // Controller | Link