From 62fdb1966ea605cf9a670d27f28c6d91f684e12d Mon Sep 17 00:00:00 2001 From: Michael McMullin Date: Fri, 10 Mar 2017 22:45:32 +0000 Subject: [PATCH] Add support for PlaceResult.opening_hours (#14859) --- googlemaps/index.d.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/googlemaps/index.d.ts b/googlemaps/index.d.ts index 60e0a92dfc..765b974bf6 100644 --- a/googlemaps/index.d.ts +++ b/googlemaps/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Google Maps JavaScript API 3.26 // Project: https://developers.google.com/maps/ -// Definitions by: Folia A/S , Chris Wrench , Kiarash Ghiaseddin , Grant Hutchins , Denis Atyasov +// Definitions by: Folia A/S , Chris Wrench , Kiarash Ghiaseddin , Grant Hutchins , Denis Atyasov , Michael McMullin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* @@ -2224,6 +2224,22 @@ declare namespace google.maps { types: string[]; } + export interface OpeningHours { + open_now: boolean, + periods: OpeningPeriod[], + weekday_text: string[] + } + + export interface OpeningPeriod { + open: OpeningHoursTime, + close?: OpeningHoursTime + } + + export interface OpeningHoursTime { + day: number, + time: string + } + export interface PredictionTerm { offset: number; value: string; @@ -2290,6 +2306,7 @@ declare namespace google.maps { icon: string; international_phone_number: string; name: string; + opening_hours: OpeningHours; permanently_closed: boolean; photos: PlacePhoto[]; place_id: string;