fix(core): update
This commit is contained in:
@ -116,10 +116,11 @@ export class StatePart<TStatePartName, TStatePayload> {
|
||||
/**
|
||||
* dispatches an action on the statepart level
|
||||
*/
|
||||
public async dispatchAction<T>(stateAction: StateAction<TStatePayload, T>, actionPayload: T) {
|
||||
public async dispatchAction<T>(stateAction: StateAction<TStatePayload, T>, actionPayload: T): Promise<TStatePayload> {
|
||||
await this.cumulativeDeferred.promise;
|
||||
const newState = await stateAction.actionDef(this, actionPayload);
|
||||
this.setState(newState);
|
||||
await this.setState(newState);
|
||||
return this.getState();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user