-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synthesize namespace records for proper esm interop (#19675)
* Integrate importStar and importDefault helpers * Accept baselines * Support dynamic imports, write helpers for umd module (and amd is possible) kinds * Accept baselines * Support AMD, use same helper initialization as is normal * update typechecker to have errors on called imported namespaces and good error recovery with a quickfix * Overhaul allowSyntheticDefaultExports to be safer * Put the new behavior behind a flag * Rename strictESM to ESMInterop * ESMInterop -> ESModuleInterop, make default for tsc --init * Rename ESMInterop -> ESModuleInterop in module.ts, add emit test (since fourslash doesnt do that) * Remove erroneous semicolons from helper * Reword diagnostic * Change style * Edit followup diagnostic * Add secondary quickfix for call sites, tests forthcoming * Add synth default to namespace import type, enhance quickfix * Pair of spare tests for good measure * Fix typos in diagnostic message * Improve comment clarity * Actually accept the updated changes to the esmodule interop description * ESModule -> esModule * Use find and not forEach * Use guard * Rely on implicit falsiness of Result.False * These should have been emit flags
- Loading branch information
Showing
65 changed files
with
1,019 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.