import type { IPatchHandle, TPatchState } from "../../../query/types/index.js"; import { type TDataState } from "./machine-helpers.js"; import { MachineBase } from "./MachineBase.js"; export type TPatchCreateResult = { machine: TMachine; handle: IPatchHandle; }; /** * Abstract intermediate base for data-bearing machine states (success, refreshing, refresh-error). * * Carries `data`, `updatedAt`, `patchState` and all patch methods. * Concrete subtypes (MachineSuccess, MachineRefreshing, MachineRefreshError) * extend this and implement `withState` to preserve their identity on transitions. */ export declare abstract class MachineWithData extends MachineBase { readonly state: TDataState; protected constructor(state: TDataState); get data(): TData; get updatedAt(): number; get patchState(): TPatchState | null; protected abstract withState(state: TDataState): this; createPatch(patchFn: (data: TData) => void, onSettle?: () => void): TPatchCreateResult; finishPatch(): this; finishAllPatches(): this; }