Closed
Description
Bug Report
π Search Terms
"Cannot read properties of undefined"
, getInferredTypeParameterConstraint
, getTypeFromTypeNodeWorker
π Version & Regression Information
- This is a crash
- This changed between versions 4.7.4 and 4.8.2
β― Playground Link
TBD
π» Code
TBD
This is occurring in a private repo with a lot of code.
I plan to progressively delete code until I can whittle it down to a minimal repro but that may take several days so until then I thought I'd file this in case anyone has tips on where to start looking.
π Actual behavior
β― yarn build
yarn run v1.22.19
$ tsc
/home/birtles/referee/node_modules/typescript/lib/tsc.js:98394
throw e;
^
TypeError: Cannot read properties of undefined (reading 'kind')
at getTypeFromTypeNodeWorker (/home/birtles/referee/node_modules/typescript/lib/tsc.js:53060:26)
at getTypeFromTypeNode (/home/birtles/referee/node_modules/typescript/lib/tsc.js:53057:49)
at getEffectiveTypeArgumentAtIndex (/home/birtles/referee/node_modules/typescript/lib/tsc.js:68314:24)
at Array.<anonymous> (/home/birtles/referee/node_modules/typescript/lib/tsc.js:50294:52)
at getMappedType (/home/birtles/referee/node_modules/typescript/lib/tsc.js:53203:46)
at instantiateTypeWorker (/home/birtles/referee/node_modules/typescript/lib/tsc.js:53516:24)
at instantiateTypeWithAlias (/home/birtles/referee/node_modules/typescript/lib/tsc.js:53509:26)
at instantiateType (/home/birtles/referee/node_modules/typescript/lib/tsc.js:53495:37)
at _loop_15 (/home/birtles/referee/node_modules/typescript/lib/tsc.js:50296:58)
at getInferredTypeParameterConstraint (/home/birtles/referee/node_modules/typescript/lib/tsc.js:50327:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
π Expected behavior
Build succeeds.