scriptable-testlab
Version:
A lightweight, efficient tool designed to manage and update scripts for Scriptable.
27 lines (24 loc) • 1.04 kB
TypeScript
import { AbsLocation } from 'scriptable-abstract';
interface LocationMockState {
currentLocation: Location.CurrentLocation;
accuracy: 'best' | 'tenMeters' | 'hundredMeters' | 'kilometer' | 'threeKilometers';
simulatedDelay?: number;
}
declare class MockLocation extends AbsLocation<LocationMockState> {
protected static _instance: MockLocation | undefined;
static get instance(): MockLocation;
protected constructor();
private addLocationNoise;
private simulateDelay;
current(): Promise<Location.CurrentLocation>;
setAccuracyToBest(): void;
setAccuracyToTenMeters(): void;
setAccuracyToHundredMeters(): void;
setAccuracyToKilometer(): void;
setAccuracyToThreeKilometers(): void;
reverseGeocode(latitude: number, longitude: number, locale?: string): Promise<Location.GeocodeSummary[]>;
setCurrentLocation(location: Location.CurrentLocation): void;
setSimulatedDelay(delay: number): void;
disableSimulatedDelay(): void;
}
export { type LocationMockState, MockLocation };