Skip to content

esModuleInterop doesn't affect reexports #39464

Closed

Description

TypeScript Version: 4.0.0-dev.20200707

Search Terms:

esmoduleinterop reexport

Code

https://github.com/proxy/gist.github.com/b48d1791d83ff67581238190eb583f67

Expected behavior:

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

Actual behavior:

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

Activity

  1. added
    Needs Investigation
    on Jul 14, 2020
  2. added
    Rescheduled
    on Dec 11, 2020
  3. rbuckton commented on Dec 17, 2020

    @rbuckton
    Contributor
    // @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

  4. rbuckton commented on Dec 17, 2020

    @rbuckton
    Contributor

    This was fixed by #39490 and shipped in 4.0

  5. added
    Has Repro
    on Dec 17, 2020
  6. added
    Fixed
    and removed
    Needs Investigation
    on Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

FixedHas ReproRescheduled

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions