Class Document. BaseDocument
source · [−]Expand description
This is an abstract class representing a document and provides methods for creating and manipulating documents.
@typeparam
T - The type of data stored in the document.
@typeparam
A - The type of action the document can take.
Constructors
source
constructor
constructor
source
new <T, A>(reducer: Reducer<T, BaseAction | A>, initialState?: Partial<Document<T, A>> & {
data: T;
}): BaseDocument<T, A>
new <T, A>(reducer: Reducer<T, BaseAction | A>, initialState?: Partial<Document<T, A>> & {
data: T;
}): BaseDocument<T, A>
Constructs a BaseDocument instance with an initial state.
Properties
Accessors
Methods
source
dispatch
dispatch
source
(action: BaseAction | A): BaseDocument<T, A>
(action: BaseAction | A): BaseDocument<T, A>
Dispatches an action to update the state of the document.
@returns
The Document instance.