Description
I am getting the exception below when running tsc
on a project. Unfortunately I cant seem to create a minimal example to reproduce it, but looking through the source of tsc
, there seems to be a case where refs is undefined here: https://github.com/Microsoft/TypeScript/blob/831be5d0788467f7fe5d708f0d404661b82e5462/src/compiler/transformers/declarations.ts#L78
TypeScript Version: 2.9.2 seems to still happen with typescript@next
Search Terms:
Object.trackReferencedAmbientModule
Cannot read property 'set' of undefined
Code
I can't seem to create a reproducable example, and cannot upload the code causing the error as its proprietary.
Expected behavior: should compile correctly
Actual behavior:
Exeception thrown:
TypeError: Cannot read property 'set' of undefined at Object.trackReferencedAmbientModule (***/node_modules/typescript/lib/tsc.js:57838:18) at getNameOfSymbolAsWritten (***/node_modules/typescript/lib/tsc.js:24622:53) at symbolToTypeNode (***/node_modules/typescript/lib/tsc.js:24412:32) at typeToTypeNodeHelper (***/node_modules/typescript/lib/tsc.js:23908:28) at symbolToParameterDeclaration (***/node_modules/typescript/lib/tsc.js:24316:41) at ***/node_modules/typescript/lib/tsc.js:24256:89 at Array.map (<anonymous>) at signatureToSignatureDeclarationHelper (***/node_modules/typescript/lib/tsc.js:24256:55) at createTypeNodeFromObjectType (***/node_modules/typescript/lib/tsc.js:24030:49) at createAnonymousTypeNode (***/node_modules/typescript/lib/tsc.js:23997:42)
Playground Link:
Related Issues: