title: typescript: using variables declared externally
body: <p>I've got an application that is migrated into typescript. In my index.html file I've got 2 files (actually, a lot more, but those are significant):</p>
  
  <ul>
  <li>static.js - which holds the declaration: <code>var staticData = {...};</code>, built automatically by <code>grunt-json</code> grunt task (nevermind what it does, it's just dynamically generated)</li>
  <li>app.js - which is the typescript source dumped into js.</li>
  </ul>
  
  <p>There is .ts a file that is used to build the <code>app.js</code>, which has following content:</p>
  
  <pre><code>mp.core.CoreModule
  .constant('CONFIG', staticData.config)
  .constant('lodash', _)
  </code></pre>
  
  <p>It's just declaring angular constants. When I try to compile this typescript file, I get following error:</p>
  
  <pre><code>Running "typescript:app" (typescript) task
  &gt;&gt; app/modules/core/coreModuleConfig.ts(2,21): error TS2304: Cannot find name 's
  taticData'.
  &gt;&gt; app/modules/core/coreModuleConfig.ts(3,21): error TS2304: Cannot find name '_
  '.
  Warning: Task "typescript:app" failed. Use --force to continue.
  </code></pre>
  
  <p>I can understand the problem - typescript doesn't know what these variables are. The problem is that staticData is a js-file variable and I've got no idea how I can make those file cope with each other... Lodash' case is the same - it's loaded into the HTML as an external script.</p>