You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler accepts this module, and if you import it, you'll find that A is only exported as a type, not a value, but that B is both a type and value.
Note that two lines (1 and 3) both attempt to export A. If you make the B block try to do the same thing (add export before the first declaration of B) the compiler rejects the module with: "Individual declarations in merged declaration 'B' must be all exported or all local".
I suspect the right resolution of this is that it should reject the double export of A as well in this module.
The text was updated successfully, but these errors were encountered:
Summary:
A TypeScript interface becomes a Closure function.
The previous code attempted to export that function when the
interface was exported, but due to
microsoft/TypeScript#10122
it actually wasn't exporting.
You can see this in the new test goldens, where export.js now
includes "Bar" as an export. (Bar is a TypeScript interface but
at the Closure level it is a value and must be in the module
exports.)
This also lets us remove a crazy forward declare hack that actually
wasn't necessary -- it was just working around that the export
wasn't working.
This matches the exporting behavior in d090fe4.
Reviewers: rkirov
Reviewed By: rkirov
Subscribers: typescript-eng
Differential Revision: https://reviews.angular.io/D213
[email protected]
The compiler accepts this module, and if you import it, you'll find that A is only exported as a type, not a value, but that B is both a type and value.
Note that two lines (1 and 3) both attempt to export A. If you make the B block try to do the same thing (add
export
before the first declaration of B) the compiler rejects the module with: "Individual declarations in merged declaration 'B' must be all exported or all local".I suspect the right resolution of this is that it should reject the double export of A as well in this module.
The text was updated successfully, but these errors were encountered: