-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(query-core): shorten listeners code #7913
fix(query-core): shorten listeners code #7913
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 32b815a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
commit: @tanstack/angular-query-devtools-experimental
@tanstack/angular-query-experimental
@tanstack/eslint-plugin-query
@tanstack/query-async-storage-persister
@tanstack/query-broadcast-client-experimental
@tanstack/query-core
@tanstack/query-devtools
@tanstack/query-persist-client-core
@tanstack/query-sync-storage-persister
@tanstack/react-query
@tanstack/react-query-devtools
@tanstack/react-query-next-experimental
@tanstack/react-query-persist-client
@tanstack/solid-query
@tanstack/solid-query-devtools
@tanstack/solid-query-persist-client
@tanstack/svelte-query
@tanstack/svelte-query-devtools
@tanstack/svelte-query-persist-client
@tanstack/vue-query
@tanstack/vue-query-devtools
More templates
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left intention
@@ -1,10 +1,7 @@ | |||
type Listener = () => void | |||
|
|||
export class Subscribable<TListener extends Function = Listener> { |
There was a problem hiding this comment.
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
export class Subscribable<TListener extends Function = Listener> { | ||
protected listeners: Set<TListener> | ||
export class Subscribable<TListener extends Function> { | ||
protected listeners = new Set<TListener>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I shorten listeners code
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7913 +/- ##
===========================================
+ Coverage 44.61% 63.29% +18.67%
===========================================
Files 187 127 -60
Lines 7087 4536 -2551
Branches 1574 1262 -312
===========================================
- Hits 3162 2871 -291
+ Misses 3562 1437 -2125
+ Partials 363 228 -135 |
No description provided.