Skip to content

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

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions