Fix: define BatteryInfo as local interface instead of importing from @ohos.batteryInfo

This commit is contained in:
Eiloud 2026-05-13 17:48:19 +08:00
parent 52d3e82881
commit 1089553835

View File

@ -33,10 +33,6 @@ import type GestureEvent from '@ohos.multimodalInput.gestureEvent';
import type ConfigurationConstant from '@ohos.app.ability.ConfigurationConstant'; import type ConfigurationConstant from '@ohos.app.ability.ConfigurationConstant';
import type common from '@ohos.app.ability.common'; import type common from '@ohos.app.ability.common';
import type window from '@ohos.window'; import type window from '@ohos.window';
import type batteryInfo from '@ohos.batteryInfo';
// Re-export battery info type
export type BatteryInfo = batteryInfo.BatteryBasicInfo;
export interface ILoginInfo { export interface ILoginInfo {
status: boolean; status: boolean;
@ -335,6 +331,13 @@ export interface WindowPreferences {
closable: boolean; closable: boolean;
} }
export interface BatteryInfo {
batteryLevel: number;
isCharging: boolean;
chargedTime: number;
dischargeTime: number;
}
export interface OcrAdapterImage { export interface OcrAdapterImage {
width: number; width: number;
height: number; height: number;