@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/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<void> | Promise<void>, options?: _ActionOptions): {
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": "20.1.0",
3
+ "version": "21.0.0-dev.master-6ca4440",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
- "@angular/core": ">=20.0.0 <21.0.0",
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
+ }
@@ -1,3 +1,3 @@
1
1
  {
2
- "@ngxs/store": "20.1.0"
2
+ "@ngxs/store": "21.0.0"
3
3
  }
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../fesm2022/ngxs-store-experimental.mjs"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../fesm2022/ngxs-store-internals.mjs"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../../fesm2022/ngxs-store-internals-testing.mjs"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../fesm2022/ngxs-store-operators.mjs"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../fesm2022/ngxs-store-plugins.mjs"
3
- }