react-native-device-info
Version:
Get device information using react-native
47 lines (46 loc) • 1.32 kB
TypeScript
/**
* High-level classification of the device hardware.
*/
export declare type DeviceType = 'Handset' | 'Tablet' | 'Tv' | 'Desktop' | 'GamingConsole' | 'unknown';
/**
* Possible power states reported by the native layer.
*/
export declare type BatteryState = 'unknown' | 'unplugged' | 'charging' | 'full';
/**
* Snapshot of the device's current power conditions.
*/
export interface PowerState {
batteryLevel: number;
batteryState: BatteryState;
lowPowerMode: boolean;
[key: string]: any;
}
/**
* Map describing which location providers are currently enabled.
*/
export interface LocationProviderInfo {
[key: string]: boolean;
}
/**
* Shared shape returned by asynchronous hooks in this module.
*/
export interface AsyncHookResult<T> {
loading: boolean;
result: T;
}
/**
* Disk capacity buckets used by iOS when querying storage information.
*/
export declare type AvailableCapacityType = 'total' | 'important' | 'opportunistic';
/**
* Google Play Services App Set ID payload describing identifier and scope.
* When the API is unavailable, id is "unknown" and scope is -1.
*/
export interface AppSetIdInfo {
id: string;
scope: number;
}
/**
* Allowed scope values returned with the App Set ID (1: app, 2: developer).
*/
export declare type AppSetIdScope = 1 | 2;