Closed
Description
typescript@2.1.0-dev.20160803
export type A = string;
function A() {}
export {A}
type B = string;
var B: void;
export {B};
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.
Activity
DanielRosenwasser commentedon Aug 4, 2016
Yup, and I agree that we should disallow the double export.
properly export interface functions