It looks like the list of imports provided by getSourceFile, ultimately used by getReferencedFiles, includes a tslib import, which seems reasonable.
However, the parent of the importName is Program itself, which does not have a parent. getSymbolAtLocation on the tslib import will, internally, call isExternalModuleImportEqualsDeclaration on the node.parent.parent, which doesn't exist, leading to a crash.
This prevents IntelliSense in VS Code from working at all.
A local hack that, because it was easy, I have implemented is wrapping the checker.getSymbolAtLocation call in Project.prototype.getReferencedFiles in a try/catch block that rethrows the exception unless importName.text === 'tslib'. This restores IntelliSense to working condition.
Including any tslib helper (by way of importHelpers) is enough to cause the crash.
It looks like the list of imports provided by
getSourceFile, ultimately used bygetReferencedFiles, includes atslibimport, which seems reasonable.However, the
parentof theimportNameis Program itself, which does not have aparent.getSymbolAtLocationon thetslibimport will, internally, callisExternalModuleImportEqualsDeclarationon thenode.parent.parent, which doesn't exist, leading to a crash.This prevents IntelliSense in VS Code from working at all.
A local hack that, because it was easy, I have implemented is wrapping the
checker.getSymbolAtLocationcall inProject.prototype.getReferencedFilesin a try/catch block that rethrows the exception unlessimportName.text === 'tslib'. This restores IntelliSense to working condition.Including any
tslibhelper (by way ofimportHelpers) is enough to cause the crash.