title: How to reference `window` variable in a mixed Javascript/Typescript project
body: <p>I've got a <code>create-react-app</code> React project that I'm (very slowly) starting to move over to Typescript. In my various init files (all of which are currently Javascript files), I've declared some global app variables on the <code>window</code> object--basically <code>window.MyApp</code>. I get that perhaps I should switch over to <code>Context</code> for these variables, but that's not an option right now.</p>
  
  <p>What I'd like to do is to be able to reference variables on the <code>window.MyApp</code> scope from within a Typescript file. So, something like:</p>
  
  <pre><code>const myVar = `${window.MyApp.appBasePath}path/to/something/`
  </code></pre>
  
  <p>However, Typescript throws up this error:</p>
  
  <pre><code>Property 'MyApp' does too exist on type 'Window'
  </code></pre>
  
  <p>So...is there an easy fix to this? Or does this mean I need to convert all my init files where <code>window.MyApp</code> is declared over to Typescript, and do something like:</p>
  
  <pre><code>interface Window {
      MyApp: any
  }
  </code></pre>
  
  <p>I'm hoping to avoid that level of re-write at this point, as I'm still at the "toe in the water" phase of Typescript integration.</p>
  
  <p>Any guidance is appreciated!</p>