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
RangeError: Maximum call stack size exceeded
at getAwaitedTypeNoAlias (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:68058:39)
at mapType (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:58207:85)
at getAwaitedTypeNoAlias (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:68071:60)
at getAwaitedTypeNoAlias (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:68082:35)
at mapType (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:58207:85)
at getAwaitedTypeNoAlias (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:68071:60)
at getAwaitedTypeNoAlias (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:68082:35)
at mapType (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:58207:85)
at getAwaitedTypeNoAlias (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:68071:60)
at getAwaitedTypeNoAlias (/home/nic/Documents/dev/babel/babel/node_modules/typescript/lib/tsc.js:68082:35)
🙂 Expected behavior
Not crash, but maybe report a type error (since env returns SimpleType and not T).
Bug Report
🔎 Search Terms
Maximum call stack size exceeded
InternalError: too much recursion
generics type parameter promise recursive crash
getAwaitedTypeNoAlias
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code (you need to open your browser's console to see the error)
💻 Code
🙁 Actual behavior
TS crashes due to an infinitely recursive call
🙂 Expected behavior
Not crash, but maybe report a type error (since
env
returnsSimpleType
and notT
).For reference, this comes from some real-world code (that should be valid and not report a type error, but it was a too complex example to use in the issue description): https://github.com/babel/babel/blob/87f26d5a172dae8f6d81a86c9d831e60c99220fe/packages/babel-core/src/config/helpers/config-api.ts#L50-L68
The text was updated successfully, but these errors were encountered: