Repository navigation
Pass Match.type handlers the matched input alone - #10875
Open
jasonkuhrt wants to merge 3 commits into
Open
jasonkuhrt wants to merge 3 commits into
jasonkuhrt wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 67bd37a The changes in this PR will be included in the next version bump. This PR includes changesets to release 40 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
Co-authored-by: Jason Kuhrt <[email protected]>
Co-authored-by: Jason Kuhrt <[email protected]>
effect-bot
force-pushed
the
match-type-handler-input
branch
from
November 24, 2026 01:57
a08cf54 to
9bc40e2
Compare
Co-authored-by: Jason Kuhrt <[email protected]>
This branch is waiting to be deployed
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.
Closes #10873
Closes EFF-4231
Match.typehandlers receive only the matched input again. Since #7363 they were called with(input, input), so passingparseIntas a handler read the input as the radix.Changes
makeTypeMatcherrecords aforwardArgsflag at construction. It istrueforMatch.fnandfalseforMatch.type,Match.typeTagsandMatch.valueTags, andaddcarries it over.Match.resultandMatch.orElseread the flag once when the terminal is built and pass the original arguments to the handler only when it is set.Match.fnforwarding and all public types are unchanged.typeTagsandvalueTagsbuild their matcher withtype(), so the unary decision lives in one place.When/Notguard checks inresultgo through onematcheshelper.packages/effect/test/Match.test.tsfor single-caseMatch.type(matched handler andorElsefallback), multi-caseMatch.type, andMatch.typeTags.effect.Verification
pnpm test --run packages/effect/test/Match.test.ts: 10/10 passedpnpm test-types Match.tst.ts: 44/44 passedpnpm lint-fixandpnpm check: cleantype,fnandvaluematchers shows no change frommain.Co-authored-by: Jason Kuhrt [email protected]