/**
 * Tracks geolocation of the device.
 *
 * @param options Additional watching options.
 * @param errorCallback Method to execute in case of an error, e.g. when the user denies location sharing permissions.
 * @returns Locational data, or `undefined` when unavailable.
 *
 * @example
 * function Component() {
 *   const geolocation = useGeolocation();
 *   if (geolocation) {
 *     const { coords } = geolocation;
 *   }
 *   // ...
 * }
 */
export default function useGeolocation(options?: PositionOptions, errorCallback?: (error: PositionError) => void): Position | undefined;
