react-native-amap-geolocation
react-native-amap-geolocation copied to clipboard
interface Location类型定义有不匹配的地方
调用Geolocation.getCurrentPosition()的时候,position打印出来的数据和当前类型定义文件不匹配。
这是打印出来的数据:

这是当前文件类型: export interface Location { accuracy: number; latitude: number; longitude: number; altitude?: number; speed?: number; heading?: number; timestamp?: number; errorCode?: ErrorCode; errorInfo?: string; locationDetail?: string; locationType?: LocationType; gpsAccuracy?: GpsAccuracy; coordinateType?: "WGS84" | "GCJ02"; trustedLevel?: TrustedLevel; }
position 的类型是这个
https://github.com/qiuxiang/react-native-amap-geolocation/blob/d3bc83100e3c6243b445d87a8fd6476bfd68e61e/src/geolocation.ts#L20-L29
而 location 的类型也没问题,只是有些字段没有标注出来。