Repository navigation
refactor(result)!: remove resolve helper - #140
Merged
Merged
Conversation
Teach await-to-consume versus return-to-forward, preserve falsey errors, and separate failure mapping from transaction guarantees. Ground the distributable skill in shipped Wellcrafted source and tests.
The query adapters already require Result-returning functions, so resolve added a second boundary name without a real caller. Use unwrap for the single Result-to-throwing conversion.
braden-w
marked this pull request as ready for review
August 20, 2026 21:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Result query adapters already require Result-returning functions, so
resolveadded a second boundary name without a real caller. This makesunwrapthe single operation for converting a known Result into a value-or-throwing contract.\n\nThe publicresolveexport and its mixedT | Result<T, E>behavior are removed. The query and mutation adapters now callunwrap, and the README and API documentation teach the single path.\n\n## Breaking\n\nresolveis no longer exported fromwellcrafted/result.\n\nts\n// Before\nconst value = resolve(resultOrValue);\n\n// After\nconst value = unwrap(result);\n\n\nCallers that accept both plain values and Results should choose that union at their own boundary before callingunwrap.