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

warn instead of forcing ESM interoperability #736

Merged
merged 1 commit into from
Sep 20, 2018

Conversation

huafu
Copy link
Collaborator

@huafu huafu commented Sep 20, 2018

To allow the required override of module ts config value, the esModuleInterop is set to true. But that has been done in all the cases.

For more flexibility, only allowSyntheticDefaultExports is set to true in the case where module is something else than commonjs AND esModuleInterop is not set to true. Also in that case a diagnostic is reported which by default would fail the compilation (but can be bypassed using the diagnostic filtering system).

This also means that user can stick to deprecated/not standardised version of import if they want.

This fixes #737

@huafu huafu added this to the v23.10.1 milestone Sep 20, 2018
@huafu huafu requested a review from kulshekhar September 20, 2018 08:29
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1863

  • 25 of 25 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.9%) to 90.765%

Totals Coverage Status
Change from base Build 1862: 0.9%
Covered Lines: 974
Relevant Lines: 1023

💛 - Coveralls

@huafu huafu requested review from kulshekhar and removed request for kulshekhar September 20, 2018 08:58
@huafu huafu mentioned this pull request Sep 20, 2018
Copy link
Collaborator

@GeeWee GeeWee left a comment

Choose a reason for hiding this comment

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

approving with no check

@huafu huafu merged commit 6ccbff3 into kulshekhar:master Sep 20, 2018
@huafu huafu deleted the detect-import-and-throw-if-none branch September 20, 2018 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test failed when import * as X from 'Y'
3 participants