From ff671eae5357d87f687d2ce93440244072ad4862 Mon Sep 17 00:00:00 2001 From: Niels Swimberghe Date: Mon, 22 Jan 2018 16:47:17 -0500 Subject: [PATCH] [Actions-on-google] add Coordinates interface for long latitude (#23084) * [actions-on-google] Add coordinates interface with lat and long The coordinates property typed as object, which forced users to cast coordinates manually. With the Coordinates interface that is not necessary anymore. * Fix missing semi colons --- types/actions-on-google/assistant-app.d.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/types/actions-on-google/assistant-app.d.ts b/types/actions-on-google/assistant-app.d.ts index 58d933baf2..d835915259 100644 --- a/types/actions-on-google/assistant-app.d.ts +++ b/types/actions-on-google/assistant-app.d.ts @@ -263,8 +263,8 @@ export interface UserName { * User's permissioned device location. */ export interface DeviceLocation { - /** {latitude, longitude}. Requested with SupportedPermissions.DEVICE_PRECISE_LOCATION. */ - coordinates: object; + /** Coordinates: {latitude, longitude}. Requested with SupportedPermissions.DEVICE_PRECISE_LOCATION. */ + coordinates: Coordinates; /** Full, formatted street address. Requested with SupportedPermissions.DEVICE_PRECISE_LOCATION. */ address: string; /** Zip code. Requested with SupportedPermissions.DEVICE_COARSE_LOCATION. */ @@ -273,6 +273,16 @@ export interface DeviceLocation { city: string; } +/** + * Coordinates containing latitude and longitude + */ +export interface Coordinates { + /** Latitude coordinate. */ + latitude: number; + /** Longitude coordinate. */ + longitude: number; +} + /** * User object. */