import { Dispatch, SetStateAction } from 'react'; export interface StateMediator { (newState: any): S; (newState: any, dispatch: Dispatch>): void; } export declare type UseMediatedStateReturn = [S, Dispatch>]; export declare function useMediatedState(mediator: StateMediator): UseMediatedStateReturn; export declare function useMediatedState(mediator: StateMediator, initialState: S): UseMediatedStateReturn;