import { MachineError } from "./MachineError.js"; import { MachinePending } from "./MachinePending.js"; import { MachineRefreshError } from "./MachineRefreshError.js"; import { MachineRefreshing } from "./MachineRefreshing.js"; import { MachineSuccess } from "./MachineSuccess.js"; export { MachineBase } from "./MachineBase.js"; /** * Union of all Machine subtypes. * * Backward-compatible: existing code typed as `Machine` still works * because all subtypes extend `MachineBase` and carry the same `.state` shape. */ export type Machine = MachinePending | MachineSuccess | MachineError | MachineRefreshing | MachineRefreshError; export declare namespace Machine { function pending(args: TArgs): MachinePending; function fromSnapshot(snapshot: { args: TArgs; data: TData; updatedAt: number; }, isStale?: boolean): MachineSuccess | MachineRefreshing; }