export interface BatteryInfo { isCharging: boolean; chargePercent: number; } export interface BatteryInterface { battery: BatteryInfo; } export interface BatteryComponentProps { state: BatteryInterface; color?: string; } export type BatteryState = BatteryInterface | null; export type BatteryChangeHandler = (state: BatteryState) => void; export type BatterySubscription = () => void; export interface BatteryModule { getCurrentState: () => Promise; addListener: (type: string, handler: Function) => void; removeListeners: (type: string, handler: Function) => void; }