diff --git a/types/googlemaps/googlemaps-tests.ts b/types/googlemaps/googlemaps-tests.ts index af271f0d46..65768ee0db 100644 --- a/types/googlemaps/googlemaps-tests.ts +++ b/types/googlemaps/googlemaps-tests.ts @@ -749,6 +749,17 @@ const autocomplete = new google.maps.places.Autocomplete(document.createElement( const placeResult = autocomplete.getPlace(); placeResult.name; // $ExpectType string +/***** google.maps.places.AutocompleteService *****/ +new google.maps.places.AutocompleteService() + .getPlacePredictions( + {input: 'Kyiv, Ukr'}, + (result) => { + result[0] + .structured_formatting + .secondary_text_matched_substrings; // $ExpectType PredictionSubstring[] | undefined + } + ); + /***** google.maps.ImageMapType *****/ const imageMapType = new google.maps.ImageMapType({ alt: 'alt', diff --git a/types/googlemaps/index.d.ts b/types/googlemaps/index.d.ts index 11ba3a17f3..5c2ccd2ccd 100644 --- a/types/googlemaps/index.d.ts +++ b/types/googlemaps/index.d.ts @@ -3548,6 +3548,7 @@ declare namespace google.maps { main_text: string; main_text_matched_substrings: PredictionSubstring[]; secondary_text: string; + secondary_text_matched_substrings?: PredictionSubstring[]; } interface OpeningHours {