@ngxs/store 3.8.2-dev.master-25397f3 → 3.8.2-dev.master-397e451

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.
Files changed (122) hide show
  1. package/index.d.ts +6 -757
  2. package/internals/custom-rxjs-subjects.d.ts +42 -0
  3. package/internals/index.d.ts +9 -204
  4. package/internals/initial-state.d.ts +8 -0
  5. package/internals/internal-tokens.d.ts +3 -0
  6. package/internals/memoize.d.ts +9 -0
  7. package/internals/metadata.d.ts +25 -0
  8. package/internals/ngxs-app-bootstrapped-state.d.ts +8 -0
  9. package/internals/state-stream.d.ts +15 -0
  10. package/internals/state-token.d.ts +7 -0
  11. package/internals/symbols.d.ts +88 -0
  12. package/internals/testing/fresh-platform.d.ts +1 -0
  13. package/internals/testing/helpers/ngxs-test.component.d.ts +8 -0
  14. package/internals/testing/helpers/ngxs-test.module.d.ts +10 -0
  15. package/internals/testing/index.d.ts +4 -28
  16. package/internals/testing/ngxs.setup.d.ts +7 -0
  17. package/internals/testing/skip-console-logging.d.ts +1 -0
  18. package/internals/testing/symbol.d.ts +14 -0
  19. package/operators/append.d.ts +5 -0
  20. package/operators/compose.d.ts +2 -0
  21. package/operators/iif.d.ts +10 -0
  22. package/operators/index.d.ts +13 -101
  23. package/operators/insert-item.d.ts +6 -0
  24. package/operators/patch.d.ts +7 -0
  25. package/operators/remove-item.d.ts +6 -0
  26. package/operators/types.d.ts +56 -0
  27. package/operators/update-item.d.ts +9 -0
  28. package/operators/utils.d.ts +8 -0
  29. package/package.json +2 -2
  30. package/plugins/actions.d.ts +15 -0
  31. package/plugins/index.d.ts +3 -62
  32. package/plugins/symbols.d.ts +13 -0
  33. package/plugins/utils.d.ts +29 -0
  34. package/schematics/src/actions/actions.factory.d.ts +3 -0
  35. package/schematics/src/ng-add/add-declaration.d.ts +4 -0
  36. package/schematics/src/ng-add/ng-add.factory.d.ts +9 -0
  37. package/schematics/src/starter-kit/starter-kit.factory.d.ts +3 -0
  38. package/schematics/src/state/state.factory.d.ts +3 -0
  39. package/schematics/src/store/store.factory.d.ts +3 -0
  40. package/schematics/src/utils/common/lib.config.d.ts +10 -0
  41. package/schematics/src/utils/common/project-files.config.d.ts +3 -0
  42. package/schematics/src/utils/common/properties.d.ts +1 -0
  43. package/schematics/src/utils/config.d.ts +119 -0
  44. package/schematics/src/utils/generate-utils.d.ts +4 -0
  45. package/schematics/src/utils/interfaces/package.interface.d.ts +7 -0
  46. package/schematics/src/utils/ng-utils/ast-utils.d.ts +99 -0
  47. package/schematics/src/utils/ng-utils/ng-ast-utils.d.ts +5 -0
  48. package/schematics/src/utils/ng-utils/project.d.ts +2 -0
  49. package/schematics/src/utils/ng-utils/standalone/app_config.d.ts +16 -0
  50. package/schematics/src/utils/ng-utils/standalone/code_block.d.ts +46 -0
  51. package/schematics/src/utils/ng-utils/standalone/index.d.ts +1 -0
  52. package/schematics/src/utils/ng-utils/standalone/rules.d.ts +38 -0
  53. package/schematics/src/utils/ng-utils/standalone/util.d.ts +28 -0
  54. package/schematics/src/utils/normalize-options.d.ts +11 -0
  55. package/schematics/src/utils/project.d.ts +19 -0
  56. package/src/actions/symbols.d.ts +7 -0
  57. package/src/actions-stream.d.ts +37 -0
  58. package/src/configs/messages.config.d.ts +13 -0
  59. package/src/decorators/action.d.ts +30 -0
  60. package/src/decorators/select/select-factory.d.ts +16 -0
  61. package/src/decorators/select/select.d.ts +7 -0
  62. package/src/decorators/select/symbols.d.ts +9 -0
  63. package/src/decorators/selector/selector.d.ts +9 -0
  64. package/src/decorators/selector/symbols.d.ts +73 -0
  65. package/src/decorators/selector-options.d.ts +5 -0
  66. package/src/decorators/state.d.ts +5 -0
  67. package/src/dev-features/ngxs-development.module.d.ts +10 -0
  68. package/src/dev-features/ngxs-unhandled-actions-logger.d.ts +17 -0
  69. package/src/dev-features/symbols.d.ts +8 -0
  70. package/src/execution/dispatch-outside-zone-ngxs-execution-strategy.d.ts +14 -0
  71. package/src/execution/internal-ngxs-execution-strategy.d.ts +10 -0
  72. package/src/execution/noop-ngxs-execution-strategy.d.ts +8 -0
  73. package/src/execution/symbols.d.ts +16 -0
  74. package/src/internal/dispatcher.d.ts +36 -0
  75. package/src/internal/fallback-subscriber.d.ts +3 -0
  76. package/src/internal/internals.d.ts +105 -0
  77. package/src/internal/lifecycle-state-manager.d.ts +24 -0
  78. package/src/internal/state-context-factory.d.ts +18 -0
  79. package/src/internal/state-factory.d.ts +61 -0
  80. package/src/internal/state-operations.d.ts +21 -0
  81. package/src/internal/state-operators.d.ts +2 -0
  82. package/src/internal/unhandled-rxjs-error-callback.d.ts +2 -0
  83. package/src/ivy/ivy-enabled-in-dev-mode.d.ts +6 -0
  84. package/src/module.d.ts +13 -0
  85. package/src/modules/ngxs-feature.module.d.ts +10 -0
  86. package/src/modules/ngxs-root.module.d.ts +10 -0
  87. package/src/ngxs-unhandled-error-handler.d.ts +16 -0
  88. package/src/operators/leave-ngxs.d.ts +7 -0
  89. package/src/operators/of-action.d.ts +56 -0
  90. package/src/plugin-manager.d.ts +13 -0
  91. package/src/plugin_api.d.ts +1 -0
  92. package/src/private_api.d.ts +3 -0
  93. package/src/public_api.d.ts +23 -0
  94. package/src/selectors/create-model-selector.d.ts +10 -0
  95. package/src/selectors/create-pick-selector.d.ts +6 -0
  96. package/src/selectors/create-property-selectors.d.ts +5 -0
  97. package/src/selectors/create-selector.d.ts +19 -0
  98. package/src/selectors/index.d.ts +5 -0
  99. package/src/selectors/private_api.d.ts +7 -0
  100. package/src/selectors/selector-checks.util.d.ts +9 -0
  101. package/src/selectors/selector-metadata.d.ts +7 -0
  102. package/src/selectors/selector-models.d.ts +10 -0
  103. package/src/selectors/selector-types.util.d.ts +6 -0
  104. package/src/selectors/selector-utils.d.ts +9 -0
  105. package/src/standalone-features/feature-providers.d.ts +7 -0
  106. package/src/standalone-features/index.d.ts +4 -0
  107. package/src/standalone-features/initializers.d.ts +29 -0
  108. package/src/standalone-features/plugin.d.ts +17 -0
  109. package/src/standalone-features/preboot.d.ts +26 -0
  110. package/src/standalone-features/provide-states.d.ts +18 -0
  111. package/src/standalone-features/provide-store.d.ts +22 -0
  112. package/src/standalone-features/root-providers.d.ts +8 -0
  113. package/src/store.d.ts +60 -0
  114. package/src/symbols.d.ts +102 -0
  115. package/src/utils/compose.d.ts +23 -0
  116. package/src/utils/create-dispatch-map.d.ts +4 -0
  117. package/src/utils/create-select-map.d.ts +4 -0
  118. package/src/utils/dispatch.d.ts +2 -0
  119. package/src/utils/freeze.d.ts +5 -0
  120. package/src/utils/public_api.d.ts +4 -0
  121. package/src/utils/select.d.ts +16 -0
  122. package/src/utils/store-validators.d.ts +5 -0
@@ -0,0 +1,23 @@
1
+ export type StateFn = (...args: any[]) => any;
2
+ /**
3
+ * Composes a array of functions from left to right. Example:
4
+ *
5
+ * compose([fn, final])(state, action);
6
+ *
7
+ * then the funcs have a signature like:
8
+ *
9
+ * function fn (state, action, next) {
10
+ * console.log('here', state, action, next);
11
+ * return next(state, action);
12
+ * }
13
+ *
14
+ * function final (state, action) {
15
+ * console.log('here', state, action);
16
+ * return state;
17
+ * }
18
+ *
19
+ * the last function should not call `next`.
20
+ *
21
+ * @ignore
22
+ */
23
+ export declare const compose: (funcs: StateFn[]) => (...args: any[]) => any;
@@ -0,0 +1,4 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ActionDef } from '../actions/symbols';
3
+ export type ActionMap = Record<string, ActionDef<any>>;
4
+ export declare function createDispatchMap<T extends ActionMap>(actionMap: T): { readonly [K in keyof T]: (...args: ConstructorParameters<T[K]>) => Observable<void>; };
@@ -0,0 +1,4 @@
1
+ import { Signal } from '@angular/core';
2
+ import { TypedSelector, ɵSelectorReturnType } from '../selectors';
3
+ export type SelectorMap = Record<string, TypedSelector<unknown>>;
4
+ export declare function createSelectMap<T extends SelectorMap>(selectorMap: T): { readonly [K in keyof T]: Signal<ɵSelectorReturnType<T[K]>>; };
@@ -0,0 +1,2 @@
1
+ import { ActionDef } from '../actions/symbols';
2
+ export declare function dispatch<TArgs extends any[]>(ActionType: ActionDef<TArgs>): (...args: TArgs) => import("rxjs").Observable<void>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Object freeze code
3
+ * https://github.com/jsdf/deep-freeze
4
+ */
5
+ export declare const deepFreeze: (o: any) => any;
@@ -0,0 +1,4 @@
1
+ export { select } from './select';
2
+ export { dispatch } from './dispatch';
3
+ export { SelectorMap, createSelectMap } from './create-select-map';
4
+ export { ActionMap, createDispatchMap } from './create-dispatch-map';
@@ -0,0 +1,16 @@
1
+ import { Signal } from '@angular/core';
2
+ import { TypedSelector } from '../selectors';
3
+ /**
4
+ * This function serves as a utility and has multiple purposes.
5
+ * Firstly, it allows you to select properties from the state class
6
+ * without having to inject the store class and use `this.store.selectSignal`,
7
+ * resulting in a more concise implementation. Secondly, it can be used with
8
+ * other solutions such as NgRx signal store with its `signalStoreFeature` or
9
+ * `withComputed` functionalities.
10
+ *
11
+ * Please note that it's named `select` instead of `selectSignal` because
12
+ * signals are evolving into first-class primitives in Angular, displacing other
13
+ * primitives such as observables. Observables represent a stream of events,
14
+ * whereas signals represent a single value changing over time.
15
+ */
16
+ export declare function select<T>(selector: TypedSelector<T>): Signal<T>;
@@ -0,0 +1,5 @@
1
+ import { ɵStateClassInternal } from '@ngxs/store/internals';
2
+ import { StatesByName } from '../internal/internals';
3
+ export declare function ensureStateNameIsValid(name: string | null): void | never;
4
+ export declare function ensureStateNameIsUnique(stateName: string, state: ɵStateClassInternal, statesByName: StatesByName): void | never;
5
+ export declare function ensureStatesAreDecorated(stateClasses: ɵStateClassInternal[]): void | never;