Skip to content

feat: Result/ResultAsync .catchTags function #674

Open
mikkurogue wants to merge 1 commit intosupermacro:masterfrom
mikkurogue:master
Open

feat: Result/ResultAsync .catchTags function #674
mikkurogue wants to merge 1 commit intosupermacro:masterfrom
mikkurogue:master

Conversation

@mikkurogue
Copy link
Copy Markdown

I notice at work we use the .match() on Result quite a lot, and we have ts-pattern installed to match on errors (we currently use Errors as types basically with a _tag property) but I would like to preserve some of the stuff from the Error class, so I thought maybe there's some value in having a Result.catchTags method to have it already catch error tags a bit "neater".

I'm a big fan of neverthrow (also of Effect, but we can't use Effect at work sadly) so I would like to extend my "extended warranty" to a degree to maintain the catchTags portion for as long as is needed - if this would be taken upstream.

Thanks :)

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 14, 2026

⚠️ No Changeset found

Latest commit: 9ebf93f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mikkurogue mikkurogue changed the title Result/ResultAsync .catchTags function feat: Result/ResultAsync .catchTags function Mar 14, 2026
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.

1 participant