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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -