Skip to content

Docs: Mention that esModuleInterop defaults to true when module is node16 or nodenext #2587

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

Closed
voxpelli opened this issue Oct 30, 2022 · 0 comments · Fixed by #2778
Closed

Comments

@voxpelli
Copy link

voxpelli commented Oct 30, 2022

Page URL: https://www.typescriptlang.org/tsconfig#esModuleInterop

Issue: As I mentioned in microsoft/TypeScript#41139 (comment) anyone using the new "module": "node16" or "module": "nodenext" will have their esModuleInterop default to true, but the docs does not mention this fact, it instead simply writes:

By default (with esModuleInterop false or not set)

Recommended Fix: Add a Default: section in the right sidebar like there is for eg. allowSyntheticDefaultImports:

Default:
true if module is node16 or nodenext, else not set

Also, reword the By default (with esModuleInterop false or not set) to mention that esModuleInterop will sometimes be true even when not explicitly set.

Can I do a PR? I would love to, but I couldn't figure out where the data for the Default: part in the sidebar comes from.

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 a pull request may close this issue.

1 participant