-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 deriving from RxJS observables #4300
Conversation
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.
Is the hesitation about rest args just a semantic thing or possible performance?
JSPerf doesn't show any real measurable difference.
Also, should we be updating the changelog in our PRs?
I'd like to limit the amount of fixup needed for my own.
src/runtime/internal/utils.ts
Outdated
@@ -48,8 +48,8 @@ export function validate_store(store, name) { | |||
} | |||
} | |||
|
|||
export function subscribe(store, callback) { | |||
const unsub = store.subscribe(callback); | |||
export function subscribe(store, ...args) { |
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.
nit: ...callbacks
instead of ...args
?
Fixes #4298. I'm not convinced this is the best way to handle this though. Making the
subscribe
helper accept a...
rest param might not be worth it just to make the code slightly more DRY.