Skip to content

Conversation

@andrewbranch
Copy link
Member

Closes #62529

@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 21:44
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Oct 8, 2025
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 8, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements default esModuleInterop and allowSyntheticDefaultImports behavior while deprecating explicit false settings. The changes update TypeScript's module interoperability to behave as if these options are always enabled, which affects how import statements are transpiled to CommonJS.

Key changes:

  • Updates module import transpilation to use import helpers by default
  • Adds deprecation warnings for explicit false settings of esModuleInterop and allowSyntheticDefaultImports
  • Modifies type resolution for dynamic imports to include default export wrappers

Reviewed Changes

Copilot reviewed 300 out of 459 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/baselines/reference/moduleExportAliasImported.types Updates type expectations for dynamic imports to include default wrapper
tests/baselines/reference/moduleAugmentationDoesNamespaceEnumMergeOfReexport.js Adds import helper functions for namespace imports
tests/baselines/reference/mergedDeclarations7.js Includes __importStar helper for require() calls
tests/baselines/reference/legacyNodeModulesExportsSpecifierGenerationConditions.js Wraps dynamic imports with __importStar helper
tests/baselines/reference/keyofModuleObjectHasCorrectKeys.js Uses __importStar for namespace imports
tests/baselines/reference/jsxViaImport.2.js Adds __importDefault helper for default imports
tests/baselines/reference/jsxSpreadFirstUnionNoErrors.js Uses __importDefault for React import
Multiple JSX test files Consistently use __importStar for React namespace imports
Multiple import test files Add import helper functions and update error messages for deprecated options
tests/baselines/reference/importAttributes9.* Updates dynamic import type resolution

@github-project-automation github-project-automation bot moved this from Not started to Needs merge in PR Backlog Oct 22, 2025
@jakebailey
Copy link
Member

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 22, 2025

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
run dt ✅ Started 👀 Results

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

o7

@andrewbranch andrewbranch merged commit f450c1b into microsoft:main Oct 22, 2025
33 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Oct 22, 2025
@andrewbranch
Copy link
Member Author

I'll fix anything that turns up on DT tomorrow

@andrewbranch andrewbranch deleted the deprecate-esModuleInterop branch October 22, 2025 23:50
@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

There were interesting changes:

Changes are too big to display here, please check the log.

You can check the log here.

@jakebailey
Copy link
Member

Uh oh

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

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

esModuleInterop and allowSyntheticDefaultImports in TypeScript 6.0+

4 participants