/// import { LocationAndEtaDetailType } from "../base/types"; import Timeout = NodeJS.Timeout; export declare type LocationSubscribeFunctionType = (location: LocationAndEtaDetailType, timestamp: number) => void; export declare type ReloadLocationFunctionType = () => (LocationAndEtaDetailType | Promise); export declare type ConfigType = { FORCE_RELOAD_TIME_THRESHOLD: number; MAX_NOTIFY_TIME_THRESHOLD: number; MIN_NOTIFY_TIME_THRESHOLD: number; }; export declare type PartialConfigType = { FORCE_RELOAD_TIME_THRESHOLD?: number; MAX_NOTIFY_TIME_THRESHOLD?: number; MIN_NOTIFY_TIME_THRESHOLD?: number; }; declare class LocationTracker { config: ConfigType; location: LocationAndEtaDetailType; lastNotifiedLocation: LocationAndEtaDetailType; timestamp: number; notifyTimestamp: number; _subscribers: Set; _fastSubscribers: Set; _intervalId?: Timeout; constructor(); setConfig: (nextConfig: PartialConfigType) => void; reloadLocationFunction: ReloadLocationFunctionType; setReloadLocationFunction: (reloadLocationFunction: ReloadLocationFunctionType) => void; typeCheckLocation: ({ location }: LocationAndEtaDetailType) => void; typeCheckEtaEtc: ({ eta, accuracy, bearing, speed, altitude }: LocationAndEtaDetailType) => void; handleLocationChange: (newLocation: LocationAndEtaDetailType) => void; forceReloadLocation: () => Promise; tick: () => void; startTracking: () => void; stopTracking: () => void; notifySubscribers: () => void; notifyFastSubscribers: () => void; subscribe: (subscriber: LocationSubscribeFunctionType) => () => void; fastSubscribe: (subscriber: LocationSubscribeFunctionType) => () => void; throw: (message: string) => never; } declare const locationTracker: LocationTracker; export default locationTracker; export declare const handleLocationChange: (newLocation: LocationAndEtaDetailType) => void; export declare const setConfig: (nextConfig: PartialConfigType) => void; export declare const setReloadLocationFunction: (reloadLocationFunction: ReloadLocationFunctionType) => void; export declare const startTracking: () => void; export declare const stopTracking: () => void; export declare const subscribe: (subscriber: LocationSubscribeFunctionType) => () => void; export declare const fastSubscribe: (subscriber: LocationSubscribeFunctionType) => () => void;