Skip to content

Commit

Permalink
fix(query-core): shorten listeners code
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Aug 18, 2024
1 parent 59a6d3d commit c8c7fee
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 c8c7fee

Please sign in to comment.