import type { BivariantMethod } from './functions'; export type SetPartial = S | Partial | BivariantMethod<{ updater(state: S): S | Partial; }>; export type SetFull = S | BivariantMethod<{ updater(state: S): S; }>; export type SetStateReplaceArgs = [update: SetFull, replace: true, ...extraArgs: ExtraArgs]; export type SetStatePartialArgs = [update: SetPartial, replace?: false, ...extraArgs: ExtraArgs]; export type SetStateArgs = SetStatePartialArgs | SetStateReplaceArgs; /** * Rest-argument form of `setState`, used when forwarding calls. */ export type SetState | void = void> = (...args: SetStateArgs) => PersistReturn; /** * Store `setState` method overloads for partial updates and full replacement. */ export type SetStateOverloads | void = void> = BivariantMethod<{ setState(update: SetPartial, replace?: false): PersistReturn; setState(update: SetFull, replace: true): PersistReturn; }>; //# sourceMappingURL=setState.d.ts.map