From 8ddaea3e6f7c648947170504085bfa7a3d8ce05b Mon Sep 17 00:00:00 2001 From: fhelwanger Date: Mon, 4 Mar 2019 17:24:19 -0300 Subject: [PATCH] [expo] Add Accuracy enum --- types/expo/expo-tests.tsx | 10 ++++++++++ types/expo/index.d.ts | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index f2ce8d8197..bf58451f31 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -57,6 +57,16 @@ const reverseGeocode: Promise = Location.reverseGeocodeA longitude: 0 }); +Location.watchPositionAsync({ + accuracy: Location.Accuracy.BestForNavigation, + timeInterval: 10000, + distanceInterval: 0, + timeout: 10000 +}, (data) => { + data.coords; + data.timestamp; +}); + Accelerometer.addListener((obj) => { obj.x; obj.y; diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 7e75c1b7d6..2004d41754 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -2242,6 +2242,15 @@ export namespace Location { function stopGeofencingAsync(taskName: string): Promise; function hasStartedGeofencingAsync(taskName: string): Promise; function setApiKey(key: string): void; + + enum Accuracy { + Lowest = 1, + Low = 2, + Balanced = 3, + High = 4, + Highest = 5, + BestForNavigation = 6 + } } /**