diff --git a/uni_modules/uni-getbatteryinfo/utssdk/web/index.uts b/uni_modules/uni-getbatteryinfo/utssdk/web/index.uts index 85a3c945b842d40116aec2137b58996b4b7166fd..bf7da47dcd4f0320881e58b902fc2f3761d4def7 100644 --- a/uni_modules/uni-getbatteryinfo/utssdk/web/index.uts +++ b/uni_modules/uni-getbatteryinfo/utssdk/web/index.uts @@ -1,8 +1,6 @@ import { GetBatteryInfo, GetBatteryInfoOptions, GetBatteryInfoSuccess } from '../interface.uts' -export const getBatteryInfo : GetBatteryInfo = function (options : GetBatteryInfoOptions) { - // @ts-expect-error - if (navigator.getBattery) { - // @ts-expect-error +export const getBatteryInfo : GetBatteryInfo = function (options : GetBatteryInfoOptions) { + if (navigator.getBattery) { navigator.getBattery().then(battery => { const res = { errCode: 0,