I want to use the Google Maps API with my Angular project, so I used these two commands to install npm packages:
npm install @agm/core --save-dev
npm install
The import can be simplified as follows:
import {} from "googlemaps";
Create a file at your projects root directory named index.d.ts
and paste the following:
declare module 'googlemaps';
The created file needs to be located directory in the src
folder
I found this article about what is the purpose of that file
https://www.bennadel.com/blog/3169-adding-custom-typings-files-d-ts-in-an-angular-2-typescript-application.htm