@dompling/trollscript-types 1.0.47 → 1.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +21 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -849,9 +849,10 @@ interface Location {
849
849
  * 坐标转地址
850
850
  * @param lat 纬度
851
851
  * @param lng 经度
852
+ * @param locale 语言区域标识(可选,如 'zh_CN'、'en_US',默认使用系统语言)
852
853
  * @returns 地址信息对象数组
853
854
  */
854
- reverseGeocode(lat: number, lng: number): any;
855
+ reverseGeocode(lat: number, lng: number, locale: string): any;
855
856
 
856
857
  /**
857
858
  * 定位服务是否开启
@@ -859,6 +860,25 @@ interface Location {
859
860
  */
860
861
  isLocationServicesEnabled(): boolean;
861
862
 
863
+ /**
864
+ * 检查是否有 TrollStore 权限
865
+ * @returns 是否有权限
866
+ */
867
+ hasTrollStorePermission(): boolean;
868
+
869
+ /**
870
+ * 开关系统定位服务(需要 TrollStore 权限)
871
+ * @param enabled true 开启,false 关闭
872
+ * @returns 操作结果(success 表示是否成功,enabled 为当前状态)
873
+ */
874
+ setLocationServicesEnabled(enabled: boolean): any;
875
+
876
+ /**
877
+ * 切换定位服务状态(需要 TrollStore 权限)
878
+ * @returns 操作结果(success 表示是否成功,enabled 为切换后状态)
879
+ */
880
+ toggleLocationServices(): any;
881
+
862
882
  }
863
883
 
864
884
  declare const location: Location;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dompling/trollscript-types",
3
- "version": "1.0.47",
3
+ "version": "1.0.50",
4
4
  "description": "TypeScript definitions for TrollScript",
5
5
  "main": "",
6
6
  "types": "index.d.ts",