mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
When re-exporting with `export { default as Foo } from "./b"`, the
compiler should respect the `allowSyntheticDefaultImports` option even
for TypeScript source files (not just declaration files).
The fix adds logic in `getTargetofModuleDefault` to allow synthetic
defaults for export specifiers when `allowSyntheticDefaultImports` is
enabled. This is consistent with the intent of the option to allow
treating modules without a default export as if they had one.
Fixes tests:
- reexportMissingDefault.ts
- reexportMissingDefault1.ts
- reexportMissingDefault2.ts
- reexportMissingDefault3.ts
Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>