The state type this manager is attached to
Attaches an observer.
Returns a new state with the observer attached. Observers are notified asynchronously when transitions occur. Observer errors are caught and silently ignored.
The operation is idempotent - attaching an already-attached observer returns the
same State reference. Observer identity is determined by reference equality (===).
A new state with observer attached, or same reference if already attached
Detaches an observer.
Returns a new state with the observer detached.
The operation is idempotent - detaching a non-attached observer returns the
same State reference. Observer identity is determined by reference equality (===).
A new state with observer detached, or same reference if not attached
State manager.
Provides housekeeping operations for state instances, including snapshotting, restoration, and observer management. See module documentation for detailed usage examples.