import { SetStateAction, Dispatch } from 'react'; declare type Props = { state?: T; setState?: Dispatch>; }; declare type Returns = [T, Dispatch> | ((state: T) => void)]; /** * React hooks that lets you pass an optional state and setState function. This is useful when you sometimes control state or do it internally, but don't know which beforehand. * * The internal state is a fallback if you don't provide a state and setState argument. * * @param props array with the controlled state and setState function * @param initialValue optional initial value for the internal state */ export declare const useControlledOrInternalState: (props: Props, initialValue: T) => Returns; export {};