AgentStateSession
A session whose snapshot holds application state.
import type { AgentStateSession } from '@threadplane/angular';Declaration
export interface AgentStateSession<TState> {
getSnapshot(): {
readonly state?: TState;
};
subscribe(notify: () => void): () => void;
}Type parameters
TState
Members
getSnapshot · overload 1
The session's current snapshot, with its application state.
getSnapshot(): {
readonly state?: TState;
};Returns
{
readonly state?: TState;
}subscribe · overload 1
Calls notify after each new snapshot; returns the function that stops it.
subscribe(notify: () => void): () => void;Parameters
notify· required() => void
Returns
() => void