title: Property 'google' does not exist on type 'Window'
body: <p>I'm trying to use the Google Maps Api on ReactJS with the least npm modules possible. So I'm adding the script to the window object myself. But Typescript jumps after a saying: "Property 'google' does not exist on type 'Window'".</p>
  
  <p>I tried adding a property google: any to the Window interface but it doesn't work, and I can't find the proper interface inside the google types.</p>
  
  <p>This is my code: </p>
  
  <pre><code>private initMap = () =&gt; {
  this.setState({
    map: new window.google.maps.Map(document.getElementById("map"), {
      center: {
        lat: this.state.userPosition.lat,
        lng: this.state.userPosition.lng
      },
      zoom: this.state.zoom,
      mapTypeId: window.google.maps.MapTypeId.ROADMAP,
      disableDefaultUI: true,
      zoomControl: true
    })
  });
  
  this.setState({
    rangeCircle: new window.google.maps.Circle({
      strokeColor: "#007AFF",
      strokeOpacity: 0.8,
      strokeWeight: 2,
      fillColor: "#007AFF",
      fillOpacity: 0.35,
      map: this.state.map,
      center: {
        lat: this.state.userPosition.lat,
        lng: this.state.userPosition.lng
      },
      radius: this.state.radius * 1000
    })
  });
  
  this.setState({
    centerMarker: new window.google.maps.Marker({
      icon: { locationIcon },
      map: this.state.map,
      position: this.state.userPosition
    })
  });
  </code></pre>
  
  <p>};</p>
  
  <pre><code>private renderMap = () =&gt; {
      loadScript(
        "https://maps.googleapis.com/maps/api/js?key=*********&amp;callback=initMap"
      );
      window.initMap = this.initMap;
    };
  }
  
  function loadScript(url: string) {
    const index = window.document.getElementsByTagName("script")[0];
    const script = window.document.createElement("script");
  
    script.src = url;
    script.async = true;
    script.defer = true;
  
    if (index.parentNode) {
      index.parentNode.insertBefore(script, index);
    }
  
  }
  </code></pre>
  
  <p>--------------UPDATE------------------</p>
  
  <p>I created this interface:</p>
  
  <pre><code>interface IGoogle {
      maps: {
          Circle: google.maps.Circle;
          Map: google.maps.Map;
          Marker: google.maps.Marker;
      }
  }
  </code></pre>
  
  <p>And added a google property inside Window:</p>
  
  <pre><code>interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, GlobalFetch, WindowOrWorkerGlobalScope, WindowEventHandlers {
      google: IGoogle;
      initMap: () =&gt; void;
  </code></pre>
  
  <p><strong>And it still returns the same error.</strong></p>