clutz
clutz copied to clipboard
Duplicate definitions when externs file contains nested object literals
When given an extern file with the content
var a = {
b : {
Duplicated:function() {}
},
NotDuplicated:function() {}
};
It outputs the following
declare namespace ಠ_ಠ.clutz.a {
function NotDuplicated ( ) : any ;
}
declare namespace ಠ_ಠ.clutz.a.b {
function Duplicated ( ) : any ;
}
declare namespace ಠ_ಠ.clutz.a.b {
function Duplicated ( ) : any ;
}
The obvious workaround is to declare the externs like this but I figured I would report the issue anyway
var a = {};
a.b.Duplicated = function() {};
a.NotDuplicated = function() {};