Skip to main content
 

Compiler experts:

The JS style guide mentions that UPPER_CASE implies @const-- however when I try compiling this code using


  /**  @type{number}
   *@const*/
  var FOO = 1;
  FOO = 2;

it fails, but

  /**@type{number} */
  var FOO = 1;
  FOO = 2;

succeeds

Oddly enough this succeeds as well, which I would expect to work..
  /**@type{number}@const*/
  var FOO = 1;
  FOO = 2;

Any ideas?  These tests were done with http://closure-compiler.appspot.com -- I have not tested using google3 (yet)  Just wanted to make sure that the style guide meshes with the way the compiler treats things..


http://closure-compiler.appspot.com/home