mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
all fields except "name" optional in PlaceResult
This commit is contained in:
@@ -124,7 +124,7 @@ data.setStyle({
|
||||
cursor: "pointer",
|
||||
fillColor: "#79B55B",
|
||||
fillOpacity: 1,
|
||||
icon: <google.maps.Icon>{ url: "//maps.google.com/mapfiles/ms/icons/blue.png" },
|
||||
icon: { url: "//maps.google.com/mapfiles/ms/icons/blue.png" } as google.maps.Icon,
|
||||
shape: { coords: [1, 2, 3], type: "circle" },
|
||||
strokeColor: "#79B55B",
|
||||
strokeOpacity: 1,
|
||||
@@ -449,3 +449,8 @@ service.findPlaceFromPhoneNumber({
|
||||
|
||||
results[0].name; // $ExpectType string
|
||||
});
|
||||
|
||||
/***** google.maps.places.Autocomplete *****/
|
||||
const autocomplete = new google.maps.places.Autocomplete(document.createElement('input'));
|
||||
const placeResult = autocomplete.getPlace();
|
||||
placeResult.name; // $ExpectType string
|
||||
|
||||
Vendored
+23
-22
@@ -11,6 +11,7 @@
|
||||
// Sven Kreiss <https://github.com/svenkreiss>
|
||||
// Umar Bolatov <https://github.com/bolatovumar>
|
||||
// Michael Gauthier <https://github.com/gauthierm>
|
||||
// Colin Doig <https://github.com/captain-igloo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/*
|
||||
@@ -2726,29 +2727,29 @@ declare namespace google.maps {
|
||||
}
|
||||
|
||||
export interface PlaceResult {
|
||||
address_components: GeocoderAddressComponent[];
|
||||
adr_address: string;
|
||||
aspects: PlaceAspectRating[];
|
||||
formatted_address: string;
|
||||
formatted_phone_number: string;
|
||||
geometry: PlaceGeometry;
|
||||
html_attributions: string[];
|
||||
icon: string;
|
||||
id: string;
|
||||
international_phone_number: string;
|
||||
address_components?: GeocoderAddressComponent[];
|
||||
adr_address?: string;
|
||||
aspects?: PlaceAspectRating[];
|
||||
formatted_address?: string;
|
||||
formatted_phone_number?: string;
|
||||
geometry?: PlaceGeometry;
|
||||
html_attributions?: string[];
|
||||
icon?: string;
|
||||
id?: string;
|
||||
international_phone_number?: string;
|
||||
name: string;
|
||||
opening_hours: OpeningHours;
|
||||
permanently_closed: boolean;
|
||||
photos: PlacePhoto[];
|
||||
place_id: string;
|
||||
price_level: number;
|
||||
rating: number;
|
||||
reviews: PlaceReview[];
|
||||
types: string[];
|
||||
url: string;
|
||||
utc_offset: number;
|
||||
vicinity: string;
|
||||
website: string;
|
||||
opening_hours?: OpeningHours;
|
||||
permanently_closed?: boolean;
|
||||
photos?: PlacePhoto[];
|
||||
place_id?: string;
|
||||
price_level?: number;
|
||||
rating?: number;
|
||||
reviews?: PlaceReview[];
|
||||
types?: string[];
|
||||
url?: string;
|
||||
utc_offset?: number;
|
||||
vicinity?: string;
|
||||
website?: string;
|
||||
}
|
||||
|
||||
export interface PlaceReview {
|
||||
|
||||
Reference in New Issue
Block a user