type InferStateActions = Actions extends { [actionName: string]: (...args: never[]) => unknown; } ? { [actionName in keyof Actions]: (...args: Parameters) => void; } : unknown; type IsValidActions = Extract extends never ? Actions : never; type SetState = (fn: (state: T) => Partial) => void; type GetState = () => T; export declare function withActions (state: State) => void; }>(config: (set: SetState, get: GetState) => State, actions: IsValidActions): (set: SetState>, get: GetState>) => State & InferStateActions; export {};