title: Visual Studio Code JavaScript Intellisense not working for objects properties
body: <p>I'm using Visual Studio Code 1.11.1.</p>
  
  <p>For the following code, Intellisense works correctly, understanding that the <em>canvas</em> variable is of type <em>HTMLCanvasElement</em>:</p>
  
  <pre><code>var canvas = document.getElementsByTagName('canvas')[0];
  </code></pre>
  
  <p>In fact, when I write the name of that variable followed by a dot it shows me all properties and methods of <em>HTMLCanvasElement</em>.</p>
  
  <p>However, using the following code, in which I wrap that variable inside an object (acting as a namespace), Intellisense doesn't understand anymore that the variable is of type <em>HTMLCanvasElement</em>:</p>
  
  <pre><code>// create a namespace "App"
  var App;
  App = {};
  
  App.canvas = document.getElementsByTagName('canvas');
  </code></pre>
  
  <p>When I write "<em>App.canvas</em>" followed by a dot character, Intellisense doesn't show me all the properties and methods of <em>HTMLCanvasElement</em>. In fact, it considers <em>App.canvas</em> of type <em>any</em>.</p>
  
  <p>I've tried also to use the <em>@type</em> annotation like in the following code, but the result is the same:</p>
  
  <pre><code>// create a namespace "App"
  var App;
  App = {};
  
  /** @type {HTMLCanvasElement} */
  App.canvas = document.getElementsByTagName('canvas')[0];
  </code></pre>
  
  <p>Is it possible to make Intellisense understand the variable types for properties of objects (like <em>App.canvas</em> in my example)?</p>