title: Annotate Singleton objects in JavaScript for the Google Closure Compiler, or "dangerous use of the global this object" warning
body: <p>I'm working with the Google Closure Compiler in ADVANCED_OPTIMIZATIONS compilation level and have started to annotate my constructors because I get all kinds of warnings: </p>
  
  <blockquote>
    <p>WARNING - dangerous use of the global this object</p>
  </blockquote>
  
  <p>For my 'constructor' type functions I'll annotate them like this:</p>
  
  <pre><code>/**
   * Foo is my constructor
   * @constructor
   */
  Foo = function() {
     this.member = {};
  }
  
  /**
   * does something
   * @this {Foo}
   */
  Foo.prototype.doSomething = function() {
     ...
  }
  </code></pre>
  
  <p>That seems to work fine, however what if I have a 'singleton' object that isn't constructed with var myFoo = new Foo(); 
  I couldn't find in the documentation how to annotate this type of object because its type is just object right?</p>
  
  <pre><code>Bar = {
     member: null,
     init: function() {
        this.member = {};
     }
  };
  </code></pre>