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(anzen): add unwrap method #88

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sviridoff
Copy link
Contributor

No description provided.

return Result.failure(
.then((value) => Result.success(value))
.catch((err) =>
Result.failure(
parseErr ? parseErr(err) : (err as E),
Copy link
Contributor

@albertms10 albertms10 Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More succinct:

  parseErr?.(err) ?? (err as E),

With a notable difference: if parseErr returns a nullable value, it will now default to err instead. Is this what we want?

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.

2 participants