You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Breaking change: Depth limit now hit for some types in 4.3Β #43877
Happens in a large codebase, I am currently unable to reproduce. The new error appears when a complex mapped & conditional type is used
π Actual behavior
Multiple new: error TS2589: Type instantiation is excessively deep and possibly infinite.
π Expected behavior
Type checks successfully as in 4.2
Note
I bisected and found that this PR is introducing this break. While the behavior outlined there seems to be a net improvement, maybe a solution that doesn't break existing types can be found? Or if not this should be outlined in the 4.3 release notes as a breaking change.
I'll let Ryan Cavanaugh (@RyanCavanaugh) re-triage if appropriate, but if there's a good general fix here, it might be good to bring it to 4.3. There might be limitations though, and we might have to consider this "Working as Intended" or "Design Limitation".
Activity
RyanCavanaugh commentedon Apr 29, 2021
cc Daniel Rosenwasser (@DanielRosenwasser) fyi
dragomirtitian commentedon May 17, 2021
Ryan Cavanaugh (@RyanCavanaugh) Daniel Rosenwasser (@DanielRosenwasser) I have a repro for the issue. It's not very small but it's the smallest I could get. This works with 4.2 but not 4.3:
Playground Link
DanielRosenwasser commentedon May 17, 2021
I'll let Ryan Cavanaugh (@RyanCavanaugh) re-triage if appropriate, but if there's a good general fix here, it might be good to bring it to 4.3. There might be limitations though, and we might have to consider this "Working as Intended" or "Design Limitation".
andykog commentedon Jun 22, 2021
Here's another repro (smaller than Titian Cernicova-Dragomir (@dragomirtitian)'s):
Playground link