Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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> {
Copy link
Collaborator Author

@manudeli manudeli Aug 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no case using default Listener of TListener in all tanstack/query's packages

protected listeners: Set<TListener>
export class Subscribable<TListener extends Function> {
protected listeners = new Set<TListener>()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shorten listeners code


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

Expand Down