From 315ef851405b31da2dd2833f71e3d02ff2a49988 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Fri, 24 Feb 2023 14:52:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E8=8E=B7=E5=8F=96=E7=94=B5?= =?UTF-8?q?=E9=87=8F=E7=BB=84=E4=BB=B6=20=E8=81=94=E5=90=88=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uts-getbatteryinfo/utssdk/interface.uts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/uni_modules/uts-getbatteryinfo/utssdk/interface.uts b/uni_modules/uts-getbatteryinfo/utssdk/interface.uts index b029929..b80df5a 100644 --- a/uni_modules/uts-getbatteryinfo/utssdk/interface.uts +++ b/uni_modules/uts-getbatteryinfo/utssdk/interface.uts @@ -1,6 +1,9 @@ type GetBatteryInfoResult = { /** * 错误码 + * 0:成功 + * 1001:getAppContext is null + * 1002:navigator.getBattery is unsupported */ errCode: number, /** @@ -25,7 +28,7 @@ interface UniError { /** * 错误码 */ - errCode:T, + errCode:number, /** * 调用API的名称 */ @@ -40,17 +43,6 @@ interface UniError { cause:any } -/** - * 错误码 - */ -type GetBatteryInfoErrorCode = - /** 成功 */ - 0 - /** getAppContext is null */ - | 1001 - /** navigator.getBattery is unsupported */ - | 1002 -; export type GetBatteryInfoOptions = { @@ -61,7 +53,7 @@ export type GetBatteryInfoOptions = { /** * 接口调用失败的回调函数 */ - fail?: (res: UniError) => void + fail?: (res: UniError) => void /** * 接口调用成功的回调 */ -- GitLab