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 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

return true;
}
return false;
return true;
Copy link
Member

Choose a reason for hiding this comment

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

The declaration of these flags also needs to change in commandLineOptions lists too.

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: Not started

Development

Successfully merging this pull request may close these issues.

esModuleInterop and allowSyntheticDefaultImports in TypeScript 6.0+

3 participants