import type { CoordinateExternalRoute, CoordinatePlace, CoordinatePoint, CoordinateRecommendZonePlaces, CoordinateTrackPoint, CoordinateType, CoordinateZone, ProxyServiceError, RecommendType } from "../types/interface"; export declare const createTypeError: (typeName: string, value: unknown, detail?: string) => Error; export declare function isCoordinateType(type: unknown): type is CoordinateType; export declare function isRecommendType(type: unknown): type is RecommendType; export declare function toRecommendType(type: unknown): RecommendType; interface MaybeCoordinatePlace { displayName?: string; name: string; lng?: string | number; lat?: string | number; type?: string; } export declare const toCoordinatePlaceType: (value: MaybeCoordinatePlace) => CoordinatePlace; type MaybeCoordinatePoint = { lng?: string | number; lat?: string | number; type?: string; }; export declare const toCoordinatePointType: (value: MaybeCoordinatePoint) => CoordinatePoint; export declare function isCoordinatePoint(value: any): value is CoordinatePoint; interface MaybeCoordinateZone { name?: string; path: MaybeCoordinatePoint[]; } export declare const toCoordinateZoneType: (value?: MaybeCoordinateZone) => CoordinateZone; export declare const assertNoConflictTypeAndZone: (type: unknown, zone: unknown) => void; interface MaybeCoordinateRecomendZonePlaces { adsorption?: boolean; type?: string; available?: boolean; zone?: MaybeCoordinateZone; places?: MaybeCoordinatePlace[]; } export declare const toCoordinateRecommendZonePlacesType: (value: MaybeCoordinateRecomendZonePlaces) => CoordinateRecommendZonePlaces; interface MaybeCoordinateTrackPoint { lng?: number | string; lat?: number | string; type?: string; angle?: number | string | null; speed?: number | string; timestamp?: number | string; } export declare const toCoordinateTrackPoint: (value?: MaybeCoordinateTrackPoint) => CoordinateTrackPoint; interface MaybeCoordinateExternalRoute { path?: MaybeCoordinatePoint[]; duration?: number | string | null; distance?: number | string | null; } export declare const toCoordinateExternalRoute: (maybeCoordinateExternalRoute?: MaybeCoordinateExternalRoute) => CoordinateExternalRoute; export declare function isProxyServiceError(error: unknown): error is ProxyServiceError; export declare function toGeolocationPositionError(error: unknown, prefix?: string): GeolocationPositionError; /** * @warning: 目前只用到 * * GeolocationPosition.coords.latitude * * GeolocationPosition.coords.longitude * 如果将来用到其他属性,需要修补充 */ export declare function assertGeolocationPosition(position: unknown): asserts position is GeolocationPosition; export declare function toGeolocationGetCurrentPosition(fn: Geolocation["getCurrentPosition"], fnName?: string): Geolocation["getCurrentPosition"]; export {};