Skip to content

Commit 6500c98

Browse files
authored
refactor(query-core): shorten listeners code (#7913)
1 parent ab1a353 commit 6500c98

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/query-core/src/subscribable.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
type Listener = () => void
2-
3-
export class Subscribable<TListener extends Function = Listener> {
4-
protected listeners: Set<TListener>
1+
export class Subscribable<TListener extends Function> {
2+
protected listeners = new Set<TListener>()
53

64
constructor() {
7-
this.listeners = new Set()
85
this.subscribe = this.subscribe.bind(this)
96
}
107

0 commit comments

Comments
 (0)