getGeolocation.d.ts 807 B

123456789101112131415161718192021222324252627282930313233
  1. export interface GeolocationParams {
  2. targetAccuracy?: number;
  3. coordinate?: number;
  4. withReGeocode?: boolean;
  5. useCache?: boolean;
  6. }
  7. export interface GeolocationResult {
  8. longitude: number;
  9. latitude: number;
  10. accuracy: number;
  11. address: string;
  12. province: string;
  13. city: string;
  14. district: string;
  15. road: string;
  16. netType: string;
  17. operatorType: string;
  18. errorMessage: string;
  19. errorCode: number;
  20. isWifiEnabled: boolean;
  21. isGpsEnabled: boolean;
  22. isFromMock: boolean;
  23. isMobileEnabled: boolean;
  24. provider: string;
  25. }
  26. declare function getGeolocation(args: GeolocationParams): Promise<GeolocationResult>;
  27. declare namespace getGeolocation {
  28. var version: {
  29. android: string;
  30. ios: string;
  31. };
  32. }
  33. export default getGeolocation;