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
RangeError: Maximum call stack size exceeded at getAwaitedTypeNoAliasย #49723
RangeError: Maximum call stack size exceeded
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36632:70)
at mapper (src\compiler\checker.ts:36628:71)
at mapType (src\compiler\checker.ts:23959:95)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36629:60)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36678:37)
at mapper (src\compiler\checker.ts:36628:71)
at mapType (src\compiler\checker.ts:23959:95)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36629:60)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36678:37)
at mapper (src\compiler\checker.ts:36628:71)
at mapType (src\compiler\checker.ts:23959:95)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36629:60)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36678:37)
at mapper (src\compiler\checker.ts:36628:71)
at mapType (src\compiler\checker.ts:23959:95)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36629:60)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36678:37)
That's what I thought; I guess I'm just confused because I thought when TS produced an error for a circular type it subsequently treated the type as any, which should be enough to prevent the crash on await... I guess the bug is that this case isn't being detected as circular
Activity
jakebailey commentedon Jun 29, 2022
Actually, this is a dupe of #49646 and should be fixed by #49677.
fatcerberus commentedon Jun 29, 2022
I'm not sure how to read this type. Does this mean
Tis either:11s1s11s1s1s...or is it just a completely circular definition?
jakebailey commentedon Jun 29, 2022
It's just circular; there's an error message for types like these that can't be resolved (see the linked PR).
fatcerberus commentedon Jun 29, 2022
That's what I thought; I guess I'm just confused because I thought when TS produced an error for a circular type it subsequently treated the type as
any, which should be enough to prevent the crash onawait... I guess the bug is that this case isn't being detected as circularAndarist commentedon Jun 29, 2022
Yep, notice how I've fixed this by just adding the circularity tracking~ here:
https://github.com/microsoft/TypeScript/pull/49677/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8R36628
Add test from microsoft#49723