@ngxs/store 3.7.6-dev.master-94b06c2 → 3.7.6-dev.master-f234866

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "../../node_modules/ng-packagr/package.schema.json",
3
3
  "name": "@ngxs/store",
4
- "version": "3.7.6-dev.master-94b06c2",
4
+ "version": "3.7.6-dev.master-f234866",
5
5
  "license": "MIT",
6
6
  "sideEffects": true,
7
7
  "peerDependencies": {
@@ -1,6 +1,7 @@
1
1
  import { OnDestroy } from '@angular/core';
2
- import { Subject, Observable } from 'rxjs';
2
+ import { Observable } from 'rxjs';
3
3
  import { InternalNgxsExecutionStrategy } from './execution/internal-ngxs-execution-strategy';
4
+ import { OrderedSubject } from './internal/custom-rxjs-subjects';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
6
7
  * Status of a dispatched action
@@ -16,26 +17,6 @@ export interface ActionContext<T = any> {
16
17
  action: T;
17
18
  error?: Error;
18
19
  }
19
- /**
20
- * Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
21
- * A standard Subject does not have this guarantee.
22
- * For example, given the following code:
23
- * ```typescript
24
- * const subject = new Subject<string>();
25
- subject.subscribe(value => {
26
- if (value === 'start') subject.next('end');
27
- });
28
- subject.subscribe(value => { });
29
- subject.next('start');
30
- * ```
31
- * When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
32
- * When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
33
- */
34
- export declare class OrderedSubject<T> extends Subject<T> {
35
- private _itemQueue;
36
- private _busyPushingNext;
37
- next(value?: T): void;
38
- }
39
20
  /**
40
21
  * Internal Action stream that is emitted anytime an action is dispatched.
41
22
  */
@@ -0,0 +1,37 @@
1
+ import { Subject, BehaviorSubject } from 'rxjs';
2
+ /**
3
+ * Custom Subject that ensures that subscribers are notified of values in the order that they arrived.
4
+ * A standard Subject does not have this guarantee.
5
+ * For example, given the following code:
6
+ * ```typescript
7
+ * const subject = new Subject<string>();
8
+ subject.subscribe(value => {
9
+ if (value === 'start') subject.next('end');
10
+ });
11
+ subject.subscribe(value => { });
12
+ subject.next('start');
13
+ * ```
14
+ * When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.
15
+ * When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.
16
+ */
17
+ export declare class OrderedSubject<T> extends Subject<T> {
18
+ next: (value?: T | undefined) => void;
19
+ }
20
+ /**
21
+ * Custom BehaviorSubject that ensures that subscribers are notified of values in the order that they arrived.
22
+ * A standard BehaviorSubject does not have this guarantee.
23
+ * For example, given the following code:
24
+ * ```typescript
25
+ * const subject = new BehaviorSubject<string>();
26
+ subject.subscribe(value => {
27
+ if (value === 'start') subject.next('end');
28
+ });
29
+ subject.subscribe(value => { });
30
+ subject.next('start');
31
+ * ```
32
+ * When `subject` is a standard `BehaviorSubject<T>` the second subscriber would recieve `end` and then `start`.
33
+ * When `subject` is a `OrderedBehaviorSubject<T>` the second subscriber would recieve `start` and then `end`.
34
+ */
35
+ export declare class OrderedBehaviorSubject<T> extends BehaviorSubject<T> {
36
+ next: (value: T) => void;
37
+ }
@@ -1,12 +1,12 @@
1
1
  import { OnDestroy } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
3
2
  import { PlainObject } from '@ngxs/store/internals';
3
+ import { OrderedBehaviorSubject } from './custom-rxjs-subjects';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * BehaviorSubject of the entire state.
7
7
  * @ignore
8
8
  */
9
- export declare class StateStream extends BehaviorSubject<PlainObject> implements OnDestroy {
9
+ export declare class StateStream extends OrderedBehaviorSubject<PlainObject> implements OnDestroy {
10
10
  constructor();
11
11
  ngOnDestroy(): void;
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<StateStream, never>;