added secondary_text_matched_substrings?: (#41468)

* added `secondary_text_matched_substrings?` to the  `AutocompleteStructuredFormatting`

* added tests

* added semicolon
This commit is contained in:
Yuri Tkachenko
2020-01-08 13:08:00 -08:00
committed by Armando Aguirre
parent ff2cdfa741
commit 20c88f7ca9
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -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',
+1
View File
@@ -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 {