diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 380ea43625..c1e0b8c966 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -19,6 +19,7 @@ // Vinit Sood // Mattias Sämskar // Julian Hundeloh +// Matevz Poljanc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -720,6 +721,24 @@ export class PlaybackObject { } // #endregion +// #region BackgroundFetch +/** + * BackgroundFetch + */ +export namespace BackgroundFetch { + function getStatusAsync(): Promise; + function registerTaskAsync(taskName: string): Promise; + function unregisterTaskAsync(taskName: string): Promise; + function setMinimumIntervalAsync(minimumInterval: number): Promise; + + enum Status { + Restricted = 1, + Denied = 2, + Available = 3 + } +} +// #endregion + // #region BarCodeScanner /** * BarCodeScanner @@ -2221,6 +2240,8 @@ export namespace Location { interface LocationTaskOptions { accuracy?: number; + timeInterval: number; + distanceInterval: number; showsBackgroundLocationIndicator?: boolean; } @@ -2244,7 +2265,7 @@ export namespace Location { function reverseGeocodeAsync(location: LocationProps): Promise; function requestPermissionsAsync(): Promise; function hasServicesEnabledAsync(): Promise; - function startgeocodUpdatesAsync(taskName: string, options: LocationTaskOptions): Promise; + function startLocationUpdatesAsync(taskName: string, options: LocationTaskOptions): Promise; function stopLocationUpdatesAsync(taskName: string): Promise; function hasStartedLocationUpdatesAsync(taskName: string): Promise; function startGeofencingAsync(taskName: string, regions: Region[]): Promise;