Repository navigation
fix: revert 2218 to fix ts excessively deep types - #2234
Merged
Merged
Conversation
3 tasks done
coolsoftwaretyler
added a commit
to coolsoftwaretyler/mobx-state-tree
that referenced
this pull request
Oct 2, 2026
All six reproduce; each file compiles today and typecheck fails when the defect is fixed, via @ts-expect-error BUG markers. - mobxjs#1403, mobxjs#2216, mobxjs#2253: props and compose use plain intersections, so an optional override of a required prop stays required or becomes never. Re-landing an Omit-based override reopens the mobxjs#2230 depth trade-off (mobxjs#2218 reverted by mobxjs#2234); compose overloads need the same change. - mobxjs#1463: create() accepts any object because ExcludeReadonly (from mobxjs#2199) is an indexed access over WritableKeys; the fix only tightens. - mobxjs#1157: one directive is the reported inference limit on an unannotated circular view; ten others are the same mobxjs#2199 regression and flip when WritableKeys stops being evaluated eagerly. - mobxjs#1367: .props after preProcessSnapshot never adds new props to the declared snapshot type. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What does this PR do and why?
This PR closes #2230, by reverting #2218. That means we'll have to repoen #2216, unfortunately.
In the long term, we'll want to fix these types at the root of the repository. But since we don't have a full roadmap for that, we are going to make a practical choice to prioritize fixing #2230 over fixing #2216.
For anyone who prefers the older fix, you can either patch the package yourself, or run from
v7.0.0, which will still be available and have #2218 available in its source code.Steps to validate locally
Tests should pass, old behavior should be restored. I have modified
__tests__/core/2230.test.tsto include all of the reproducing code from #2230.