javascript - Suspicious code. The result of the 'getprop' operator is not being used warning GOOGLE CLOSURE -
i using google closure , have defined few variables. in constructor defining values. while compiling the code error
javascript/model/errorlogger.js:42: warning - suspicious code. result of 'getprop' operator not being used. ==> default: [warning] model.errorlogger.prototype.errors;
this code.
goog.provide('model.errorlogger'); /** * @constructor */ model.errorlogger = function() { this.errors =[]; this.errorshash = {}; } model.errorlogger.prototype.errors; model.errorlogger.prototype.errorshash;
why warning coming ? should mention typedef annotation ?
these lines:
model.errorlogger.prototype.errors; model.errorlogger.prototype.errorshash;
have no effect - you're referencing properties without doing them. that's it's warning - thinks meant assign them something, or pass them function, or has effect.
(also, properties won't exist in form - it's not clear you're trying here.)
Comments
Post a Comment