Closed GoogleCodeExporter closed 8 years ago
Here's a workaround:
Documenting initial definition of fn as a function solves the problem:
var a =
{
/** @type Function */
fn : function() {}
};
Original comment by dusan.smolnikar@gmail.com
on 20 Jan 2010 at 2:09
However, even with the workaround present, if I move function foo in front of
a, warning is still displayed
function foo()
{
// redefine a.fn
a.fn = function() {};
}
/**
* @namespace a
*/
var a =
{
/** @type Function */
fn : function() {}
};
Original comment by dusan.smolnikar@gmail.com
on 20 Jan 2010 at 2:31
This is "as designed" - the warning is only for your own information in case
the overwrite was unintentional, it doesn't have any effect on the operation of
the tool. The --quiet option will suppress all warnings if that is a problem.
Original comment by micmath
on 27 Jun 2010 at 9:03
Original issue reported on code.google.com by
dusan.smolnikar@gmail.com
on 20 Jan 2010 at 1:56