ms-types 0.4.10 → 0.4.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-types",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/types/global.d.ts CHANGED
@@ -202,10 +202,10 @@ declare function logw(...args: any[]): void;
202
202
  declare function loge(...args: any[]): void;
203
203
 
204
204
  /**
205
- * 查找类 (仅安卓可用)
205
+ * 导入类 (仅安卓可用)
206
206
  * @param className 类名
207
207
  * @returns 类对象
208
- * @description 查找类对象
208
+ * @description 导入类对象
209
209
  * @example
210
210
  * const clazz = importClass("com.example.TestClass");
211
211
  */
@@ -184,3 +184,37 @@ declare function $打印警告日志(...日志内容: 数组<任意类型>): 无
184
184
  * $打印错误日志("文件读取错误");
185
185
  */
186
186
  declare function $打印错误日志(...日志内容: 数组<任意类型>): 无返回值;
187
+
188
+ /**
189
+ * 导入类
190
+ * @param 类名
191
+ * @returns 类对象
192
+ * @description 导入类对象
193
+ * @example
194
+ * const clazz = $导入类("com.example.TestClass");
195
+ */
196
+ declare function $导入类(类名: 字符串): 任意类型;
197
+
198
+ /**
199
+ * 加载Dex文件 (仅安卓可用)
200
+ * @param Dex文件路径 支持apk文件
201
+ * @returns 是否加载成功
202
+ * @description 加载Dex文件到内存中
203
+ * @example
204
+ * const 是否加载成功 = $加载Dex("/sdcard/script.dex");
205
+ * if (是否加载成功) {
206
+ * $打印信息日志("Dex 文件加载成功");
207
+ * } else {
208
+ * $打印错误日志("Dex 文件加载失败");
209
+ * }
210
+ */
211
+ declare function $加载Dex(Dex文件路径: 字符串): 布尔值;
212
+
213
+ /**
214
+ * 获取安卓上下文 (仅安卓可用)
215
+ * @returns 上下文对象
216
+ * @description 获取当前安卓上下文对象
217
+ * @example
218
+ * const 上下文 = $获取上下文();
219
+ */
220
+ declare function $获取上下文(): 任意类型;