This repository was archived by the owner on Sep 1, 2026. It is now read-only.
Improve recursion identities and isDeeplyNestedType - #4913
Merged
Conversation
Anders Hejlsberg (ahejlsberg)
requested review from
Ryan Cavanaugh (RyanCavanaugh) and
Jake Bailey (jakebailey)
and
a balanced review from Copilot
August 18, 2026 15:28
Member
Author
|
TypeScript Bot (@typescript-bot) test it |
Copilot started reviewing on behalf of
Anders Hejlsberg (ahejlsberg)
August 18, 2026 15:30
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Improves recursive type relation handling to avoid false stack-depth errors for deeply circular structures.
Changes:
- Refines recursion identities for indexed-access and mapped types.
- Treats 100-level relation depth as indeterminate rather than erroneous.
- Adds regression coverage and updates affected baselines.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
internal/checker/relater.go |
Updates recursion detection and removes stack-depth diagnostics. |
testdata/tests/cases/compiler/veryDeepRelations.ts |
Adds the circular-array regression case. |
testdata/baselines/reference/compiler/veryDeepRelations.types |
Records expected type output. |
testdata/baselines/reference/compiler/veryDeepRelations.symbols |
Records expected symbol output. |
testdata/baselines/reference/compiler/excessivelyDeepConditionalTypes.errors.txt |
Removes obsolete stack-depth errors. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Anders Hejlsberg (@ahejlsberg) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Anders Hejlsberg (@ahejlsberg) Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
Jake Bailey (jakebailey)
approved these changes
Aug 18, 2026
Jake Bailey (jakebailey)
pushed a commit
to jakebailey/TypeScript
that referenced
this pull request
Aug 19, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR
See reasoning here.
Fixes #4807.