I solved this, here is what you have to do:
-
npm install @types/googlemaps --save-dev
-
<script src="http://maps.google.com/maps/api/js?key=XXXXX"></script>
inindex.html
-
declare module 'googlemaps';
intodeclarations.d.ts
-
import {googlemaps} from 'googlemaps';
in class where you using maps