source: imaps-frontend/node_modules/react-use/esm/useGeolocation.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 941 bytes
Line 
1/**
2 * @desc Made compatible with {GeolocationPositionError} and {PositionError} cause
3 * PositionError been renamed to GeolocationPositionError in typescript 4.1.x and making
4 * own compatible interface is most easiest way to avoid errors.
5 */
6export interface IGeolocationPositionError {
7 readonly code: number;
8 readonly message: string;
9 readonly PERMISSION_DENIED: number;
10 readonly POSITION_UNAVAILABLE: number;
11 readonly TIMEOUT: number;
12}
13export interface GeoLocationSensorState {
14 loading: boolean;
15 accuracy: number | null;
16 altitude: number | null;
17 altitudeAccuracy: number | null;
18 heading: number | null;
19 latitude: number | null;
20 longitude: number | null;
21 speed: number | null;
22 timestamp: number | null;
23 error?: Error | IGeolocationPositionError;
24}
25declare const useGeolocation: (options?: PositionOptions | undefined) => GeoLocationSensorState;
26export default useGeolocation;
Note: See TracBrowser for help on using the repository browser.