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

Emit export declarations in place #4259

Closed
wants to merge 4 commits into from

Conversation

sheetalkamat
Copy link
Member

Fixes #4101 and #4004

}
}
}
//let defaultName =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should #4179 go in first?

@ahejlsberg
Copy link
Member

Isn't the following now broken?

export { foo };
var foo = 1;

The reason we emit the export assignment right after the variable declaration is that the export declaration might occur anywhere in the file. Also, there might be more than one export declaration for a particular variable (e.g. to export the same variable by different names), but ideally we only want to generate one export assignment.

@sheetalkamat
Copy link
Member Author

@ahejlsberg : as @mhegazy pointed out wouldn't it be easier to fix this since user has workaround for it than the bug its fixing right now. There is no work around for the current scenario.

@mhegazy
Copy link
Contributor

mhegazy commented Sep 14, 2016

This should not be needed any longer.

@mhegazy mhegazy closed this Sep 14, 2016
@mhegazy mhegazy deleted the emitExportDeclarationsInPlace branch September 14, 2016 06:06
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants