Skip to content

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
@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.

3 participants