Skip to content

esModuleInterop doesn't affect reexports #39464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wojpawlik opened this issue Jul 7, 2020 · 2 comments
Closed

esModuleInterop doesn't affect reexports #39464

wojpawlik opened this issue Jul 7, 2020 · 2 comments
Assignees
Labels
Fixed A PR has been merged for this issue Has Repro This issue has compiler-backed repros: https://aka.ms/ts-repros Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@wojpawlik
Copy link

TypeScript Version: 4.0.0-dev.20200707

Search Terms:

esmoduleinterop reexport

Code

https://gist.github.com/b48d1791d83ff67581238190eb583f67

Expected behavior:

lib/index.js exports require('./answer') (42)

Actual behavior:

lib/index.js exports require('./answer').default (undefined)

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Jul 14, 2020
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.1 milestone Jul 14, 2020
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Dec 11, 2020
@rbuckton
Copy link
Member

// @showEmit
// @showEmittedFile: b.js
// @module: commonjs
// @allowJs: true
// @esModuleInterop: true
// @strict: true
// @filename: a.js
module.exports = 42;
// @filename: b.ts
export {default} from './a'

Workbench Repro

@rbuckton
Copy link
Member

This was fixed by #39490 and shipped in 4.0

@typescript-bot typescript-bot added the Has Repro This issue has compiler-backed repros: https://aka.ms/ts-repros label Dec 17, 2020
@rbuckton rbuckton added Fixed A PR has been merged for this issue and removed Needs Investigation This issue needs a team member to investigate its status. labels Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed A PR has been merged for this issue Has Repro This issue has compiler-backed repros: https://aka.ms/ts-repros Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
Development

No branches or pull requests

4 participants