taro-hooks
Version:
为 Taro 而设计的 Hooks Library
7 lines (6 loc) • 454 B
TypeScript
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;