export type InitialState = T | (() => T); export type NewState = T | ((previousState: T) => T); export type StateUpdater = (value: NewState) => void; export type StateTuple = readonly [T, StateUpdater]; export interface UseState { (): StateTuple; (value?: InitialState): StateTuple; } /** * @function * @template {*} T * @param {T} [initialState] - Optional initial state * @return {StateTuple} stateTuple - Tuple of current state and state updater function */ declare const useState: UseState; export { useState };