<commit_before>export {};

interface EmitterSubscription {
  remove: () => void;
}

type VolumeType =
  | "call"
  | "system"
  | "ring"
  | "music"
  | "alarm"
  | "notification";

interface VolumeConfig {
  type?: VolumeType;
  playSound?: boolean;
  showUI?: boolean;
}

interface VolumeData {
  value: number;
  call?: number;
  system?: number;
  ring?: number;
  music?: number;
  alarm?: number;
  notification?: number;
}

interface SystemSetting {
  getBrightness: () => Promise<number>;
  setBrightness: (val: number) => Promise<boolean>;
  setBrightnessForce: (val: number) => Promise<boolean>;
  getAppBrightness: () => Promise<number>;
  setAppBrightness: (val: number) => Promise<true>;
  grantWriteSettingPremission: () => void;
  getScreenMode: () => Promise<number>;
  setScreenMode: (val: number) => Promise<boolean>;
  saveBrightness: () => Promise<void>;
  restoreBrightness: () => number;
  getVolume: (type?: VolumeType) => Promise<number>;
  setVolume: (value: number, config?: VolumeConfig | VolumeType) => void;
  addVolumeListener: (
    callback: (volumeData: VolumeData) => void
  ) => EmitterSubscription;
  removeVolumeListener: (listener?: EmitterSubscription) => void;
  isWifiEnabled: () => Promise<boolean>;
  switchWifiSilence: () => void;
  switchWifi: () => void;
  isLocationEnabled: () => Promise<boolean>;
  getLocationMode: () => Promise<number>;
  switchLocation: () => void;
  isBluetoothEnabled: () => Promise<boolean>;
  switchBluetooth: () => void;
  switchBluetoothSilence: () => void;
  isAirplaneEnabled: () => Promise<boolean>;
  switchAirplane: () => void;
  openAppSystemSettings: () => Promise<void>;
  addBluetoothListener: (
    callback: (bluetoothEnabled: boolean) => void
  ) => Promise<EmitterSubscription>;
  addWifiListener: (
    callback: (wifiEnabled: boolean) => void
  ) => Promise<EmitterSubscription | null>;
  addLocationListener: (
    callback: (locationEnabled: boolean) => void
  ) => Promise<EmitterSubscription | null>;
  addLocationModeListener: (
    callback: (locationMode: number) => void
  ) => Promise<EmitterSubscription | null>;
  addAirplaneListener: (
    callback: (airplaneModeEnabled: boolean) => void
  ) => Promise<EmitterSubscription | null>;
  removeListener: (listener?: EmitterSubscription) => void;
}

declare const systemSetting: SystemSetting;
export default systemSetting;<commit_msg>Added typescript validation for switchLocation<commit_after>export {};

interface EmitterSubscription {
  remove: () => void;
}

type VolumeType =
  | "call"
  | "system"
  | "ring"
  | "music"
  | "alarm"
  | "notification";

interface VolumeConfig {
  type?: VolumeType;
  playSound?: boolean;
  showUI?: boolean;
}

interface VolumeData {
  value: number;
  call?: number;
  system?: number;
  ring?: number;
  music?: number;
  alarm?: number;
  notification?: number;
}

interface SystemSetting {
  getBrightness: () => Promise<number>;
  setBrightness: (val: number) => Promise<boolean>;
  setBrightnessForce: (val: number) => Promise<boolean>;
  getAppBrightness: () => Promise<number>;
  setAppBrightness: (val: number) => Promise<true>;
  grantWriteSettingPremission: () => void;
  getScreenMode: () => Promise<number>;
  setScreenMode: (val: number) => Promise<boolean>;
  saveBrightness: () => Promise<void>;
  restoreBrightness: () => number;
  getVolume: (type?: VolumeType) => Promise<number>;
  setVolume: (value: number, config?: VolumeConfig | VolumeType) => void;
  addVolumeListener: (
    callback: (volumeData: VolumeData) => void
  ) => EmitterSubscription;
  removeVolumeListener: (listener?: EmitterSubscription) => void;
  isWifiEnabled: () => Promise<boolean>;
  switchWifiSilence: () => void;
  switchWifi: () => void;
  isLocationEnabled: () => Promise<boolean>;
  getLocationMode: () => Promise<number>;
  switchLocation: (callback: () => void) => void;
  isBluetoothEnabled: () => Promise<boolean>;
  switchBluetooth: () => void;
  switchBluetoothSilence: () => void;
  isAirplaneEnabled: () => Promise<boolean>;
  switchAirplane: () => void;
  openAppSystemSettings: () => Promise<void>;
  addBluetoothListener: (
    callback: (bluetoothEnabled: boolean) => void
  ) => Promise<EmitterSubscription>;
  addWifiListener: (
    callback: (wifiEnabled: boolean) => void
  ) => Promise<EmitterSubscription | null>;
  addLocationListener: (
    callback: (locationEnabled: boolean) => void
  ) => Promise<EmitterSubscription | null>;
  addLocationModeListener: (
    callback: (locationMode: number) => void
  ) => Promise<EmitterSubscription | null>;
  addAirplaneListener: (
    callback: (airplaneModeEnabled: boolean) => void
  ) => Promise<EmitterSubscription | null>;
  removeListener: (listener?: EmitterSubscription) => void;
}

declare const systemSetting: SystemSetting;
export default systemSetting;
{'fraction_non_alphanumeric': 0.15003112678979041, 'fraction_numerical': 0.0, 'mean_word_length': 5.163682864450128, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 122, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2178665', 'n_tokens_mistral': 1443, 'n_tokens_neox': 1457, 'n_words': 319}