Skip to content
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

fix(typescript): allow synthetic default imports when using ModuleKind.ESNext #16438

Merged
merged 3 commits into from
Oct 27, 2022

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Oct 26, 2022

Closes #16437

@dsherret dsherret changed the title export = regression fix(typescript): allow default synthetic imports when using ModuleKind.ESNext Oct 27, 2022
@dsherret dsherret changed the title fix(typescript): allow default synthetic imports when using ModuleKind.ESNext fix(typescript): allow synthetic default imports when using ModuleKind.ESNext Oct 27, 2022
@@ -51163,7 +51163,7 @@ var ts;
var usageMode = file && getUsageModeForExpression(usage);
if (file && usageMode !== undefined) {
var result = isESMFormatImportImportingCommonjsFormatFile(usageMode, file.impliedNodeFormat);
if (usageMode === ts.ModuleKind.ESNext || result) {
if (result) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unfortunate. Essentially typescript doesn't allow synthetic default imports when using ModuleKind.ESNext, which we need to do because deno now supports importing cjs. I'll open an issue in TypeScript tomorrow.

@dsherret dsherret merged commit bfd9912 into denoland:main Oct 27, 2022
@dsherret dsherret deleted the export_equals_failing_test branch October 27, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type checking broken in canary with synthetic default imports
2 participants