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

Feature: Result.tapEither/Async #19

Merged
merged 5 commits into from
May 7, 2023
Merged

Feature: Result.tapEither/Async #19

merged 5 commits into from
May 7, 2023

Conversation

seangwright
Copy link
Owner

@seangwright seangwright commented Jan 27, 2023

  • Adds new Result.tapEither, Result.tapEitherAsync, and ResultAsync.tapEither which all execute the given callback for both success and failure cases. This is similar to .finally() except they return the Result/ResultAsync instead of a value.

These can be useful for logging calls or setting a loading state on/off independent of whether or not the operation succeeded or failed.

@seangwright seangwright self-assigned this Jan 31, 2023
@seangwright seangwright merged commit e134eba into main May 7, 2023
1 check passed
@seangwright seangwright deleted the feat/result-tap-both branch May 7, 2023 01:21
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