@ngxs/store 20.1.0 → 21.0.0-dev.master-6ca4440
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngxs-store-internals-testing.mjs +10 -10
- package/fesm2022/ngxs-store-internals.mjs +9 -9
- package/fesm2022/ngxs-store-internals.mjs.map +1 -1
- package/fesm2022/ngxs-store.mjs +132 -106
- package/fesm2022/ngxs-store.mjs.map +1 -1
- package/index.d.ts +9 -1
- package/package.json +3 -3
- package/schematics/src/utils/versions.json +1 -1
- package/experimental/package.json +0 -3
- package/internals/package.json +0 -3
- package/internals/testing/package.json +0 -3
- package/operators/package.json +0 -3
- package/plugins/package.json +0 -3
package/index.d.ts
CHANGED
|
@@ -43,6 +43,14 @@ declare class NgxsConfig {
|
|
|
43
43
|
* State context provided to the actions in the state.
|
|
44
44
|
*/
|
|
45
45
|
interface StateContext<T> {
|
|
46
|
+
/**
|
|
47
|
+
* An AbortSignal tied to the current action's lifecycle.
|
|
48
|
+
*
|
|
49
|
+
* It gives you a handle to proactively cancel ongoing async work.
|
|
50
|
+
* If you're using an observable, it will be unsubscribed automatically when cancellation occurs.
|
|
51
|
+
* If you're using async/await, check `abortSignal.aborted` after `await` blocks to decide whether to continue.
|
|
52
|
+
*/
|
|
53
|
+
abortSignal: AbortSignal;
|
|
46
54
|
/**
|
|
47
55
|
* Get the current state.
|
|
48
56
|
*/
|
|
@@ -434,7 +442,7 @@ declare function Selector<T extends SelectorDefTuple>(selectors: T): SelectorTyp
|
|
|
434
442
|
declare class ActionDirector {
|
|
435
443
|
private _registry;
|
|
436
444
|
private _actionHandlerFactory;
|
|
437
|
-
attachAction<TStateModel, TActionType extends ActionDef>(stateToken: StateToken<TStateModel>, Action: TActionType, handlerFn: (ctx: StateContext<TStateModel>, action: InstanceType<TActionType>) => void | Observable<
|
|
445
|
+
attachAction<TStateModel, TActionType extends ActionDef>(stateToken: StateToken<TStateModel>, Action: TActionType, handlerFn: (ctx: StateContext<TStateModel>, action: InstanceType<TActionType>) => void | Observable<unknown> | Promise<unknown>, options?: _ActionOptions): {
|
|
438
446
|
detach: () => void;
|
|
439
447
|
};
|
|
440
448
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActionDirector, never>;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngxs/store",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0-dev.master-6ca4440",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@angular/core": ">=
|
|
7
|
+
"@angular/core": ">=21.0.0 <22.0.0",
|
|
8
8
|
"rxjs": ">=7.0.0"
|
|
9
9
|
},
|
|
10
10
|
"schematics": "./schematics/collection.json",
|
|
@@ -85,4 +85,4 @@
|
|
|
85
85
|
"type": "opencollective",
|
|
86
86
|
"url": "https://opencollective.com/ngxs"
|
|
87
87
|
}
|
|
88
|
-
}
|
|
88
|
+
}
|
package/internals/package.json
DELETED
package/operators/package.json
DELETED
package/plugins/package.json
DELETED