Skip to content

Fix crash intersecting dynamic import w/esModuleInterop - #40249

Merged
Nathan Shively-Sanders (sandersn) merged 4 commits into
masterfrom
fix-crash-intersecting-esmoduleinterop-import
Sep 1, 2020
Merged

Nathan Shively-Sanders (sandersn) merged 4 commits into
masterfrom
fix-crash-intersecting-esmoduleinterop-import

Conversation

@sandersn

Copy link
Copy Markdown
Member

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.

Fixes #40239

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.
@sandersn

Copy link
Copy Markdown
Member Author

From discussion with Wesley Wigham (@weswigham), we decided that getResolvedMembersOrExportsOfSymbol should skip symbols with an undefined declarations.

Comment thread src/compiler/checker.ts Outdated
@sandersn
Nathan Shively-Sanders (sandersn) deleted the fix-crash-intersecting-esmoduleinterop-import branch September 1, 2020 16:10
Thibault Malbranche (Titozzz) pushed a commit to Brigad/TypeScript that referenced this pull request Sep 7, 2020
)

* 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 microsoft#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
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

tsc crashes with typescript@>4.0.0

3 participants