title: A property available in one line is not available by the next line in JS with TypeScript and Angular 2
body: <p>I'm trying to load the google charts library.
  I declared <code>google</code> as a global variable using the following piece of code:</p>
  
  <pre><code>declare var google:any;
  </code></pre>
  
  <p>Now, in <code>ngOnInit()</code>, I'm doing</p>
  
  <pre><code>google.charts.load('current',{packages:['geochart']);
  google.charts.setOnLoadCallback(this.drawMap());
  </code></pre>
  
  <p>And, now, in drawMap():</p>
  
  <pre><code>console.log("google", this.google);
  console.log("google.visualization", this.google.visualization);
  </code></pre>
  
  <p>The weirdest thing happened:
  <a href="https://i.stack.imgur.com/UdB8u.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UdB8u.jpg" alt="The Weird Angular Bug"></a></p>
  
  <p>How is it possible for an object to have property in one line and that property is undefined in the next line..?</p>