From c8c7fee2716b76e98f6451a5d47efb8086a972d1 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Sun, 18 Aug 2024 22:19:17 +0900 Subject: [PATCH] fix(query-core): shorten listeners code --- packages/query-core/src/subscribable.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/query-core/src/subscribable.ts b/packages/query-core/src/subscribable.ts index e83e1f8cec..044efe6472 100644 --- a/packages/query-core/src/subscribable.ts +++ b/packages/query-core/src/subscribable.ts @@ -1,10 +1,7 @@ -type Listener = () => void - -export class Subscribable { - protected listeners: Set +export class Subscribable { + protected listeners = new Set() constructor() { - this.listeners = new Set() this.subscribe = this.subscribe.bind(this) }