/** * Result of a state update operation. */ export interface StateUpdateResult { success: boolean; state: S; error?: string; } /** * Shallow merge two objects. * Note: Nested objects are replaced, not merged. */ export function shallowMerge>( target: T, patch: Partial ): T { return { ...target, ...patch }; }