Description
Bug Report
Compilation of tsx file throws generic error RangeError: Maximum call stack size exceeded
. When the file doesn't contain any tsx element the compilation works as expected.
Possible duplicate of:
#45632
🔎 Search Terms
Maximum call stack size exceeded
🕗 Version & Regression Information
4.3 and newer (also tested on 4.5.0-dev.20210923)
⏯ Playground Link
Playground link with relevant code
🙁 Actual behavior
RangeError: Maximum call stack size exceeded
at Object.isFunctionLikeOrClassStaticBlockDeclaration (\node_modules\typescript\lib\tsc.js:9813:27)
at isBlockScope (\node_modules\typescript\lib\tsc.js:11161:28)
at \node_modules\typescript\lib\tsc.js:11242:73
at Object.findAncestor (\npm\node_modules\typescript\lib\tsc.js:9189:26)
at Object.getEnclosingBlockScopeContainer (\npm\node_modules\typescript\lib\tsc.js:11242:19)
at checkNestedBlockScopedBinding (\npm\node_modules\typescript\lib\tsc.js:57015:32)
at checkIdentifier (\npm\node_modules\typescript\lib\tsc.js:56921:13)
at checkExpressionWorker (\npm\node_modules\typescript\lib\tsc.js:63702:28)
at checkExpression (\npm\node_modules\typescript\lib\tsc.js:63657:38)
at checkJsxExpression (\npm\node_modules\typescript\lib\tsc.js:59059:28)
🙂 Expected behavior
compilation with no error