mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
Fix crash intersecting dynamic import w/esModuleInterop (#40249)
* Fix crash intersecting dynamic import w/esModuleInterop The dynamic import shim creates a symbol without some properties that the intersection-creating code assumes are present as of #38673. This PR adds the smallest possible set of properties to avoid the crash. I'm not sure what others would be good to add. * Use symbol's declarations instead * Fix getResolvedMembersOrExportsOfSymbol instead * comment from code review
This commit is contained in:
committed by
GitHub
parent
378083fcec
commit
d572dcb272
@@ -9714,7 +9714,7 @@ namespace ts {
|
||||
|
||||
// fill in any as-yet-unresolved late-bound members.
|
||||
const lateSymbols = createSymbolTable() as UnderscoreEscapedMap<TransientSymbol>;
|
||||
for (const decl of symbol.declarations) {
|
||||
for (const decl of symbol.declarations || emptyArray) {
|
||||
const members = getMembersOfDeclaration(decl);
|
||||
if (members) {
|
||||
for (const member of members) {
|
||||
|
||||
Reference in New Issue
Block a user