Skip to content

Commit

Permalink
refactor(query-core): shorten listeners code (#7913)
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Aug 19, 2024
1 parent ab1a353 commit 6500c98
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/query-core/src/subscribable.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
type Listener = () => void

export class Subscribable<TListener extends Function = Listener> {
protected listeners: Set<TListener>
export class Subscribable<TListener extends Function> {
protected listeners = new Set<TListener>()

constructor() {
this.listeners = new Set()
this.subscribe = this.subscribe.bind(this)
}

Expand Down

0 comments on commit 6500c98

Please sign in to comment.