Files
musicdl-catalog-sync-suite/MusicFree/src/native/utils/index.ts
T

19 lines
690 B
TypeScript

import { NativeModule, NativeModules } from "react-native";
interface INativeUtils extends NativeModule {
exitApp: () => void;
checkStoragePermission: () => Promise<boolean>;
requestStoragePermission: () => void;
isIgnoringBatteryOptimizations: () => Promise<boolean>;
requestIgnoreBatteryOptimizations: () => Promise<boolean>;
showPlaybackDiagnosticNotification: (
title: string,
message: string,
) => Promise<void>;
getWindowDimensions: () => { width: number, height: number }; // Fix bug: https://github.com/facebook/react-native/issues/47080
}
const NativeUtils = NativeModules.NativeUtils;
export default NativeUtils as INativeUtils;