Skip to content

Fix crash intersecting dynamic import w/esModuleInterop #40249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 1, 2020

Conversation

sandersn
Copy link
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.
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 25, 2020
@sandersn sandersn requested a review from weswigham August 25, 2020 20:18
@sandersn
Copy link
Member Author

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

@sandersn sandersn merged commit d572dcb into master Sep 1, 2020
@sandersn sandersn deleted the fix-crash-intersecting-esmoduleinterop-import branch September 1, 2020 16:10
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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