Closed
Description
I see that this works in compiler built from recent sources:
export default A;
interface A {}
According to the ES6 specification, after "export default" we only have three options:
- class declaration
- hoistable declaration (i.e., function or generator declaration)
- AssignmentExpression
If we treat "A" from my example as an AssignmentExpression, then it should work exactly the same way as AssignmentExpression in any other place, e.g. "var x = A".
For "var x = A" we reasonably have 'Cannot find name A'.
But in my example above, 'A' is resolved.
It means, that after 'export default' we have something different from an ordinary AssignmentExpression.
Are there some special rules for what can appear after export default in the statement?
Does it have a special meaning in case of "export default Identifier"?
Thanks!