Skip to content
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(core): Provide OperationResultSource from Client methods #3060

Merged
merged 4 commits into from
Mar 16, 2023

Conversation

kitten
Copy link
Member

@kitten kitten commented Mar 16, 2023

Summary

Return a new OperationResultSource from all Client methods (which replaces PromisifiedSource on shortcut methods). This allows not only toPromise() to be called, but it can also be used as an awaitable PromiseLike and has a .subscribe(onResult) method aliasing the subscribe utility from wonka.

Set of changes

  • Rename PromisifiedSource to OperationResultSource
  • Add then and subscribe methods to OperationResultSource
  • Use withPromise on executeRequestOperation (i.e. making the above available on all client methods returning sources)

@kitten kitten merged commit c2c1328 into main Mar 16, 2023
@kitten kitten deleted the feat/easy-subscribe branch March 16, 2023 14:17
This was referenced Mar 16, 2023
@github-actions github-actions bot mentioned this pull request Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants