Description
tsc 2.6.2
in a static class meant to reference assets, the following line is repeated for each game asset, each class references only one type of asset, in this case with this the sound class:
AssetSoundPack.uniqueClassReference['assetx'] = new SoundContextResource('contextresources/sound/resource_12312.mp3', 'sound', 1, false, false, false);
This project makes heavy use of sound assets and this is where the tsc compiler gives up, commenting out half those assets (4000 lines) makes the compiler happy and the file compiles but with 8000 it gives up (that file alone makes 500K).
Additionally is there anyway to increase the call stack limit temporary?
Cannot compile a .ts file with 8000 lines
/usr/local/lib/node_modules/typescript/lib/tsc.js:56173
throw e;
^
RangeError: Maximum call stack size exceeded
at isMatchingReference (/usr/local/lib/node_modules/typescript/lib/tsc.js:26978:37)
at isMatchingReference (/usr/local/lib/node_modules/typescript/lib/tsc.js:26991:25)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27583:21)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
Expected Behavior: Although unusual in size, there shouldn't be an issue in compiling files that are 8000 lines and more.
Actual behavior: Exit with a Maximum call stack size exceeded, file did not compile.