DefinitelyTyped/types/load-google-maps-api/index.d.ts
Dmitry Demensky 93901a2c0d [googlemaps] improve map types & docs (#41044)
* Add `MVCEventHandler` alias

* Fix & specify type of `mapDiv`

[`mapDiv`](https://developers.google.com/maps/documentation/javascript/reference/map#Map.constructor) is not nullable.

* Add the missing [`getClickableIcons`](https://developers.google.com/maps/documentation/javascript/reference/map#Map.getClickableIcons) method

* Fix [`setStreetView`](https://developers.google.com/maps/documentation/javascript/reference/map#Map.setStreetView) nullable argument

* Specify types of events

* Add blank line between fields

* Add JSDoc

* Update typescript

* Fix googlemaps-tests

* Fix load-google-maps-api-tests

* Update load-google-maps-api typescript

* Fix load-google-maps-api-tests
2019-12-23 10:30:58 -06:00

67 lines
1.8 KiB
TypeScript

// Type definitions for load-google-maps-api 2.0
// Project: https://github.com/yuanqing/load-google-maps-api#readme
// Definitions by: Oscar Busk <https://github.com/oBusk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
/// <reference types="googlemaps" />
interface Options {
/**
* The Google Maps API `script` tag URL
*
* Default Value `'https://maps.googleapis.com/maps/api/js'`
*/
apiUrl?: string;
/**
* Client usage reporting channel
*
* https://developers.google.com/maps/premium/reports/usage-reports#channels
*/
channel?: string;
/**
* Client ID
*
* https://developers.google.com/maps/documentation/javascript/get-api-key#specifying-a-client-id-when-loading-the-api
*/
client?: string;
/**
* Your API key
*
* https://developers.google.com/maps/documentation/javascript/get-api-key#step-2-add-the-api-key-to-your-application
*/
key?: string;
/**
* https://developers.google.com/maps/documentation/javascript/localization#Language
*/
language?: string;
/**
* Supplemental libraries to load
*
* Default Value `[]`
*
* https://developers.google.com/maps/documentation/javascript/libraries
*/
libraries?: string[];
/**
* https://developers.google.com/maps/documentation/javascript/localization#Region
*/
region?: string;
/**
* Time in milliseconds before rejecting the Promise
*
* Default Value `10000`
*/
timeout?: number;
/**
* API Version
*
* https://developers.google.com/maps/documentation/javascript/versions
*/
v?: string;
}
declare function loadGoogleMapsApi(options?: Options): Promise<typeof google.maps>;
export = loadGoogleMapsApi;