import { Dispatch, SetStateAction } from "react"; declare type Enable = () => void; declare type Disable = () => void; declare type Toggle = () => void; declare type SetToggle = Dispatch>; declare type ReturnValue = [boolean, Enable, Disable, Toggle, SetToggle]; /** * This hooks provides an easy way to toggle a boolean flag for React * components. The main use case for this will be toggling the visibility of * something. All the provided actions are guaranteed to never change. * * @param defaultToggled Boolean if the visibility should be enabled first * render. * @return an array containing the toggled state, an enable function, a disable * function, a toggle function, and then a manual set toggle function. */ export default function useToggle(defaultToggled: boolean | (() => boolean)): ReturnValue; export {};