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 {...} doesn't work with ES6 target and non-ES6 modules #5175

Closed
ahejlsberg opened this issue Oct 8, 2015 · 0 comments
Closed

export {...} doesn't work with ES6 target and non-ES6 modules #5175

ahejlsberg opened this issue Oct 8, 2015 · 0 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ahejlsberg
Copy link
Member

In #4811 we enabled generating code for ES6 with non-ES6 modules (which, for example, is useful when targeting Node.js v4). This work didn't properly handle export {...} declarations.

Compile the following with -t es6 -m commonjs:

export function foo() { }
function bar() { }
export { bar };

Expected output is:

function foo() { }
exports.foo = foo;
function bar() { }
exports.bar = bar;

Actual output is:

function foo() { }
exports.foo = foo;
function bar() { }

I will be putting up a fix for the problem shortly.

@ahejlsberg ahejlsberg added the Bug A bug in TypeScript label Oct 8, 2015
@ahejlsberg ahejlsberg added this to the TypeScript 1.7 milestone Oct 8, 2015
@ahejlsberg ahejlsberg self-assigned this Oct 8, 2015
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Oct 8, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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

2 participants