Fix: add missing ArkTS type exports (BatteryInfo, OcrAdapterImage, TextWord, PowerMonitor, filterFileDocs)
This commit is contained in:
parent
20d4e15b42
commit
52d3e82881
@ -33,6 +33,10 @@ import type GestureEvent from '@ohos.multimodalInput.gestureEvent';
|
||||
import type ConfigurationConstant from '@ohos.app.ability.ConfigurationConstant';
|
||||
import type common from '@ohos.app.ability.common';
|
||||
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 {
|
||||
status: boolean;
|
||||
@ -117,6 +121,7 @@ export interface NativeContext {
|
||||
ClearWindowEventFilter: (origin_window_id: number) => void;
|
||||
OnCaptionButtonRectChange: (id: string, event: CaptionButtonRect) => void;
|
||||
UpdateWindowPcmodeSwitchStatusCB: (value: boolean) => void;
|
||||
PowerMonitor: PowerMonitor;
|
||||
}
|
||||
|
||||
export interface IParams {
|
||||
@ -324,8 +329,24 @@ export enum BrowserCloseResponse {
|
||||
|
||||
// Electron
|
||||
export interface WindowPreferences {
|
||||
hideTitleBar: boolean,
|
||||
minimizable: boolean,
|
||||
maximizable: boolean,
|
||||
closable: boolean,
|
||||
hideTitleBar: boolean;
|
||||
minimizable: boolean;
|
||||
maximizable: boolean;
|
||||
closable: boolean;
|
||||
}
|
||||
|
||||
export interface OcrAdapterImage {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export interface TextWord {
|
||||
word: string;
|
||||
confidence?: number;
|
||||
}
|
||||
|
||||
export interface PowerMonitor {
|
||||
OnSuspend: () => void;
|
||||
OnResume: () => void;
|
||||
OnPowerStateChanged: () => void;
|
||||
}
|
||||
|
||||
@ -43,4 +43,13 @@ export default class StringUtil {
|
||||
});
|
||||
return copy;
|
||||
}
|
||||
|
||||
static filterFileDocs(uri: string): string {
|
||||
// Remove "docs://" prefix if present and return the actual path
|
||||
if (uri.startsWith('docs://')) {
|
||||
// docs://file_URI/path -> return as-is, FileUri will handle it
|
||||
return uri;
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user