Skip to content
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

export default broken for Class expression with target ES6 and commonjs module #5594

Closed
ghalle opened this issue Nov 10, 2015 · 1 comment
Closed
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghalle
Copy link

ghalle commented Nov 10, 2015

Using typescript@next and the following compiler options:

"compilerOptions": {
  "target": "ES6",
  "module": "commonjs",
}

A class expression being default exported will be incorrectly compiled into a named export instead.

Example:

export default class Foo {}

compiles into:

class Foo {
}
exports.Foo = Foo;
@ghalle ghalle changed the title export default broken for Class with target ES6 and commonjs module export default broken for Class expression with target ES6 and commonjs module Nov 10, 2015
@mhegazy mhegazy added the Bug A bug in TypeScript label Nov 12, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Nov 12, 2015

@weswigham can you take a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants