Skip to content

Allow exporting const variables when strictNullChecks is on#15330

Merged
sandersn merged 2 commits into
microsoft:masterfrom
gcnew:exportConsts
Apr 24, 2017
Merged

Allow exporting const variables when strictNullChecks is on#15330
sandersn merged 2 commits into
microsoft:masterfrom
gcnew:exportConsts

Conversation

@gcnew
Copy link
Copy Markdown
Contributor

@gcnew gcnew commented Apr 23, 2017

Fixes #15329

==== tests/cases/conformance/es6/modules/exportConsts.ts (2 errors) ====
export { x }
export { x as xx }
export default x;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

export default should still be an error, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

According to what I'm seeing in the spec, I believe that is correct. The declaration evaluates and may have a side-effect, whereas the others are simple bindings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's what I understood as well. Thank you!

@DanielRosenwasser
Copy link
Copy Markdown
Member

👍

@sandersn sandersn merged commit 5783435 into microsoft:master Apr 24, 2017
@gcnew gcnew deleted the exportConsts branch May 22, 2017 11:50
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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.

4 participants