-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat(full-stack signals): make operations thenable #2799
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2799 +/- ##
==========================================
+ Coverage 92.60% 92.64% +0.03%
==========================================
Files 83 83
Lines 2812 2840 +28
Branches 724 728 +4
==========================================
+ Hits 2604 2631 +27
- Misses 156 157 +1
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Also ListSignal's operations need another follow-up PR to enable the thenables, right? |
@@ -65,19 +74,18 @@ export class ValueSignal<T> extends FullStackSignal<T> { | |||
* | |||
* @param callback - The function that is applied on the current value to | |||
* produce the new value. | |||
* @returns An operation subscription that can be canceled. | |||
* @returns An operation object that allows to perform additional actions, including cancellation. |
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.
* @returns An operation object that allows to perform additional actions, including cancellation. | |
* @returns An operation object that allows to perform additional actions, | |
* including cancellation. |
|
This pull request introduces a feature to make operations "thenable", which means it implements the ability for operations to return promise-like objects that can be chained. Those objects are in the
result
properties to avoid the return type themselves to be treated as promises by lint checkers.Closes #2712