vue-use-wake-lock
Version:
useWakeLock is the lightweight Vue 3 hook for managing the Wake Lock API — prevents your device from going to sleep.
13 lines • 546 B
TypeScript
import { ComputedRef, Ref } from 'vue';
interface UseWakeLockReturn {
readonly wakeLockSentinel: Ref<WakeLockSentinel | null>;
readonly active: ComputedRef<boolean>;
readonly supported: boolean;
readonly request: (type?: WakeLockSentinelType) => Promise<void>;
readonly forceRequest: (type?: WakeLockSentinelType) => Promise<void>;
readonly release: () => Promise<void>;
}
type WakeLockSentinelType = 'screen';
export declare const useWakeLock: () => UseWakeLockReturn;
export {};
//# sourceMappingURL=useWakeLock.d.ts.map