Closed
Description
Visibility rules should be relaxed to only assert that a non-exported declaration is never exported.
class TreeNode {}
class Tree {
// error TS4031: Public property 'Node' of exported class has or is using private name 'TreeNode'.
Node: typeof TreeNode;
}
namespace Tree {
}
export = Tree;
another example:
interface I {
a: number;
}
class C {
// error TS4063: Parameter 'a' of constructor from exported class has or is using private name 'I'.
constructor (a: I) { }
}
export default C;