UNPKG

taro-hooks

Version:
7 lines (6 loc) 454 B
import type { PromiseAction, PromiseWithoutOptionAction, ExcludeOption, WithUndefind } from '../type'; export type SetKeepOn = Promise<ExcludeOption<Taro.setKeepScreenOn.Option>>; export type GetBrightness = PromiseWithoutOptionAction<Taro.getScreenBrightness.SuccessCallbackOption>; export type setBrightness = PromiseAction<number>; declare function useBrightness(keepon?: boolean): [WithUndefind<number>, setBrightness]; export default useBrightness;