diff --git a/types/googlemaps/googlemaps-tests.ts b/types/googlemaps/googlemaps-tests.ts index 77a2900b7b..e161e8068e 100644 --- a/types/googlemaps/googlemaps-tests.ts +++ b/types/googlemaps/googlemaps-tests.ts @@ -418,7 +418,8 @@ let service = new google.maps.places.PlacesService(new HTMLDivElement()); service.getDetails({ placeId: '-a1', - fields: ['name'] + fields: ['name'], + sessionToken: new google.maps.places.AutocompleteSessionToken() }, (result, status) => { if (status === google.maps.places.PlacesServiceStatus.NOT_FOUND) { return; diff --git a/types/googlemaps/index.d.ts b/types/googlemaps/index.d.ts index 501dd4c1f8..dba5a5a5a1 100644 --- a/types/googlemaps/index.d.ts +++ b/types/googlemaps/index.d.ts @@ -1,14 +1,15 @@ // Type definitions for Google Maps JavaScript API 3.30 // Project: https://developers.google.com/maps/ -// Definitions by: Folia A/S , -// Chris Wrench , -// Kiarash Ghiaseddin , -// Grant Hutchins , -// Denis Atyasov , -// Michael McMullin , -// Martin Costello , +// Definitions by: Folia A/S , +// Chris Wrench , +// Kiarash Ghiaseddin , +// Grant Hutchins , +// Denis Atyasov , +// Michael McMullin , +// Martin Costello , // Sven Kreiss // Umar Bolatov +// Michael Gauthier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* @@ -2542,6 +2543,10 @@ declare namespace google.maps { getQueryPredictions(request: QueryAutocompletionRequest, callback: (result: QueryAutocompletePrediction[], status: PlacesServiceStatus) => void): void; } + export class AutocompleteSessionToken { + constructor(); + } + export interface AutocompletionRequest { bounds?: LatLngBounds|LatLngBoundsLiteral; componentRestrictions?: ComponentRestrictions; @@ -2549,6 +2554,7 @@ declare namespace google.maps { location?: LatLng; offset?: number; radius?: number; + sessionToken?: AutocompleteSessionToken; types?: string[]; } @@ -2566,6 +2572,7 @@ declare namespace google.maps { export interface PlaceDetailsRequest { placeId: string; fields?: string[]; + sessionToken?: AutocompleteSessionToken; } export interface PlaceGeometry {