export interface Action extends Record { type: T; } export type State = Record; export interface Props { onStateChange?(typeAndChanges: unknown): void; stateReducer(state: S, actionAndChanges: Action & { changes: Partial; }): Partial; } /** * This will perform a shallow merge of the given state object * with the state coming from props * (for the controlled component scenario) * This is used in state updater functions so they're referencing * the right state regardless of where it comes from. * * @param state The state of the component/hook. * @param props The props that may contain controlled values. * @returns The merged controlled state. */ export declare function getState & Props, T>(state: S, props?: P): S;