From f956aea3f1bf92dfdeb835ada1a0b696e8e3a716 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Sun, 5 Jan 2025 23:29:24 +0100 Subject: [PATCH] reduce valueof --- lib/tools/types.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/tools/types.ts b/lib/tools/types.ts index 5d5ee205..f5a25720 100644 --- a/lib/tools/types.ts +++ b/lib/tools/types.ts @@ -1,4 +1,3 @@ -import type { ValueOf } from 'type-fest'; import * as emuConstants from './emu-constants'; export type StringRecord = Record; @@ -710,11 +709,11 @@ export interface RootResult { wasAlreadyRooted: boolean; } -export type Sensors = ValueOf; -export type NetworkSpeed = ValueOf; -export type GsmVoiceStates = ValueOf; -export type GsmCallActions = ValueOf; -export type PowerAcStates = ValueOf; +export type Sensors = typeof emuConstants.SENSORS[keyof typeof emuConstants.SENSORS]; +export type NetworkSpeed = typeof emuConstants.NETWORK_SPEED[keyof typeof emuConstants.NETWORK_SPEED]; +export type GsmVoiceStates = typeof emuConstants.GSM_VOICE_STATES[keyof typeof emuConstants.GSM_VOICE_STATES]; +export type GsmCallActions = typeof emuConstants.GSM_CALL_ACTIONS[keyof typeof emuConstants.GSM_CALL_ACTIONS]; +export type PowerAcStates = typeof emuConstants.POWER_AC_STATES[keyof typeof emuConstants.POWER_AC_STATES]; export interface PlatformInfo { /**