Compare commits

...

4 Commits

Author SHA1 Message Date
6db03eee83 2.0.5 2023-04-12 20:34:34 +02:00
efc5b54d2e fix(core): update 2023-04-12 20:34:34 +02:00
9860e43398 2.0.4 2023-04-04 21:52:27 +02:00
234117c8dd fix(core): update 2023-04-04 21:52:27 +02:00
4 changed files with 993 additions and 529 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartstate",
"version": "2.0.3",
"version": "2.0.5",
"private": false,
"description": "a package that handles state in a good way",
"main": "dist_ts/index.js",
@ -14,11 +14,11 @@
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.61",
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsbundle": "^2.0.7",
"@gitzone/tsrun": "^1.2.39",
"@gitzone/tstest": "^1.0.70",
"@pushrocks/tapbundle": "^5.0.3",
"@gitzone/tstest": "^1.0.74",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.15.11"
},
"dependencies": {

1504
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartstate',
version: '2.0.3',
version: '2.0.5',
description: 'a package that handles state in a good way'
}

View File

@ -111,9 +111,11 @@ export class StatePart<TStatePartName, TStatePayload> {
/**
* is executed
*/
public stateSetup(
funcArg: (statePartArg?: StatePart<any, TStatePayload>) => Promise<TStatePayload | void>
public async stateSetup(
funcArg: (statePartArg?: StatePart<any, TStatePayload>) => Promise<TStatePayload>
) {
this.cumulativeDeferred.addPromise(funcArg(this));
const resultPromise = funcArg(this);
this.cumulativeDeferred.addPromise(resultPromise);
this.setState(await resultPromise);
}
}