@ngxs/store 18.1.2 → 18.1.3

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 (120) hide show
  1. package/LICENSE +22 -0
  2. package/experimental/index.d.ts +12 -1
  3. package/index.d.ts +745 -6
  4. package/internals/index.d.ts +206 -10
  5. package/internals/testing/index.d.ts +31 -4
  6. package/operators/index.d.ts +101 -13
  7. package/package.json +1 -1
  8. package/plugins/index.d.ts +62 -3
  9. package/schematics/src/utils/versions.json +1 -1
  10. package/experimental/pending-tasks.d.ts +0 -8
  11. package/internals/custom-rxjs-operators.d.ts +0 -2
  12. package/internals/custom-rxjs-subjects.d.ts +0 -42
  13. package/internals/initial-state.d.ts +0 -8
  14. package/internals/internal-tokens.d.ts +0 -3
  15. package/internals/memoize.d.ts +0 -9
  16. package/internals/metadata.d.ts +0 -25
  17. package/internals/ngxs-app-bootstrapped-state.d.ts +0 -8
  18. package/internals/state-stream.d.ts +0 -15
  19. package/internals/state-token.d.ts +0 -7
  20. package/internals/symbols.d.ts +0 -88
  21. package/internals/testing/fresh-platform.d.ts +0 -1
  22. package/internals/testing/helpers/ngxs-test.component.d.ts +0 -8
  23. package/internals/testing/helpers/ngxs-test.module.d.ts +0 -10
  24. package/internals/testing/ngxs.setup.d.ts +0 -7
  25. package/internals/testing/skip-console-logging.d.ts +0 -4
  26. package/internals/testing/symbol.d.ts +0 -14
  27. package/operators/append.d.ts +0 -5
  28. package/operators/compose.d.ts +0 -2
  29. package/operators/iif.d.ts +0 -10
  30. package/operators/insert-item.d.ts +0 -6
  31. package/operators/patch.d.ts +0 -7
  32. package/operators/remove-item.d.ts +0 -6
  33. package/operators/types.d.ts +0 -56
  34. package/operators/update-item.d.ts +0 -9
  35. package/operators/utils.d.ts +0 -8
  36. package/plugins/actions.d.ts +0 -15
  37. package/plugins/symbols.d.ts +0 -13
  38. package/plugins/utils.d.ts +0 -29
  39. package/schematics/src/actions/actions.factory.d.ts +0 -3
  40. package/schematics/src/ng-add/add-declaration.d.ts +0 -4
  41. package/schematics/src/ng-add/ng-add.factory.d.ts +0 -9
  42. package/schematics/src/starter-kit/starter-kit.factory.d.ts +0 -3
  43. package/schematics/src/state/state.factory.d.ts +0 -3
  44. package/schematics/src/store/store.factory.d.ts +0 -3
  45. package/schematics/src/utils/common/lib.config.d.ts +0 -10
  46. package/schematics/src/utils/common/project-files.config.d.ts +0 -3
  47. package/schematics/src/utils/common/properties.d.ts +0 -1
  48. package/schematics/src/utils/config.d.ts +0 -119
  49. package/schematics/src/utils/generate-utils.d.ts +0 -4
  50. package/schematics/src/utils/interfaces/package.interface.d.ts +0 -7
  51. package/schematics/src/utils/normalize-options.d.ts +0 -11
  52. package/schematics/src/utils/project.d.ts +0 -20
  53. package/src/actions/action-registry.d.ts +0 -12
  54. package/src/actions/symbols.d.ts +0 -7
  55. package/src/actions-stream.d.ts +0 -39
  56. package/src/configs/messages.config.d.ts +0 -13
  57. package/src/decorators/action.d.ts +0 -30
  58. package/src/decorators/select/select-factory.d.ts +0 -16
  59. package/src/decorators/select/select.d.ts +0 -7
  60. package/src/decorators/select/symbols.d.ts +0 -9
  61. package/src/decorators/selector/selector.d.ts +0 -9
  62. package/src/decorators/selector/symbols.d.ts +0 -73
  63. package/src/decorators/selector-options.d.ts +0 -5
  64. package/src/decorators/state.d.ts +0 -5
  65. package/src/dev-features/ngxs-development.module.d.ts +0 -10
  66. package/src/dev-features/ngxs-unhandled-actions-logger.d.ts +0 -17
  67. package/src/dev-features/symbols.d.ts +0 -8
  68. package/src/execution/dispatch-outside-zone-ngxs-execution-strategy.d.ts +0 -14
  69. package/src/execution/internal-ngxs-execution-strategy.d.ts +0 -10
  70. package/src/execution/noop-ngxs-execution-strategy.d.ts +0 -8
  71. package/src/execution/symbols.d.ts +0 -16
  72. package/src/internal/dispatcher.d.ts +0 -36
  73. package/src/internal/fallback-subscriber.d.ts +0 -3
  74. package/src/internal/internals.d.ts +0 -105
  75. package/src/internal/lifecycle-state-manager.d.ts +0 -24
  76. package/src/internal/state-context-factory.d.ts +0 -17
  77. package/src/internal/state-factory.d.ts +0 -57
  78. package/src/internal/state-operations.d.ts +0 -21
  79. package/src/internal/state-operators.d.ts +0 -2
  80. package/src/internal/unhandled-rxjs-error-callback.d.ts +0 -2
  81. package/src/ivy/ivy-enabled-in-dev-mode.d.ts +0 -6
  82. package/src/module.d.ts +0 -13
  83. package/src/modules/ngxs-feature.module.d.ts +0 -10
  84. package/src/modules/ngxs-root.module.d.ts +0 -10
  85. package/src/ngxs-unhandled-error-handler.d.ts +0 -16
  86. package/src/operators/leave-ngxs.d.ts +0 -6
  87. package/src/operators/of-action.d.ts +0 -56
  88. package/src/plugin-manager.d.ts +0 -13
  89. package/src/plugin_api.d.ts +0 -1
  90. package/src/private_api.d.ts +0 -3
  91. package/src/public_api.d.ts +0 -23
  92. package/src/selectors/create-model-selector.d.ts +0 -10
  93. package/src/selectors/create-pick-selector.d.ts +0 -6
  94. package/src/selectors/create-property-selectors.d.ts +0 -5
  95. package/src/selectors/create-selector.d.ts +0 -19
  96. package/src/selectors/index.d.ts +0 -5
  97. package/src/selectors/private_api.d.ts +0 -7
  98. package/src/selectors/selector-checks.util.d.ts +0 -9
  99. package/src/selectors/selector-metadata.d.ts +0 -7
  100. package/src/selectors/selector-models.d.ts +0 -10
  101. package/src/selectors/selector-types.util.d.ts +0 -6
  102. package/src/selectors/selector-utils.d.ts +0 -9
  103. package/src/standalone-features/feature-providers.d.ts +0 -7
  104. package/src/standalone-features/index.d.ts +0 -4
  105. package/src/standalone-features/initializers.d.ts +0 -29
  106. package/src/standalone-features/plugin.d.ts +0 -17
  107. package/src/standalone-features/preboot.d.ts +0 -26
  108. package/src/standalone-features/provide-states.d.ts +0 -18
  109. package/src/standalone-features/provide-store.d.ts +0 -22
  110. package/src/standalone-features/root-providers.d.ts +0 -8
  111. package/src/store.d.ts +0 -60
  112. package/src/symbols.d.ts +0 -102
  113. package/src/utils/compose.d.ts +0 -23
  114. package/src/utils/create-dispatch-map.d.ts +0 -4
  115. package/src/utils/create-select-map.d.ts +0 -4
  116. package/src/utils/dispatch.d.ts +0 -2
  117. package/src/utils/freeze.d.ts +0 -5
  118. package/src/utils/public_api.d.ts +0 -4
  119. package/src/utils/select.d.ts +0 -16
  120. package/src/utils/store-validators.d.ts +0 -5
package/index.d.ts CHANGED
@@ -1,12 +1,751 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Type, ModuleWithProviders, OnDestroy, NgZone, Signal, EnvironmentProviders } from '@angular/core';
3
+ import { ɵSharedSelectorOptions as _SharedSelectorOptions, ɵStateClass as _StateClass, ɵActionOptions as _ActionOptions, ɵPlainObjectOf as _PlainObjectOf, ɵStateClassInternal as _StateClassInternal, ɵActionHandlerMetaData as _ActionHandlerMetaData, ɵOrderedSubject as _OrderedSubject, ɵStateStream as _StateStream, ɵRuntimeSelectorContext as _RuntimeSelectorContext, StateToken, ɵStoreOptions as _StoreOptions } from '@ngxs/store/internals';
4
+ export { ɵActionOptions as ActionOptions, StateToken } from '@ngxs/store/internals';
5
+ import * as rxjs from 'rxjs';
6
+ import { Observable, Subject, Subscription, OperatorFunction } from 'rxjs';
7
+ import { StateOperator } from '@ngxs/store/operators';
8
+ export { StateOperator } from '@ngxs/store/operators';
9
+ import { NgxsPluginFn, NgxsPlugin } from '@ngxs/store/plugins';
10
+ export { InitState, NGXS_PLUGINS, NgxsNextPluginFn, NgxsPlugin, NgxsPluginFn, UpdateState, actionMatcher, getActionTypeFromInstance, getValue, setValue } from '@ngxs/store/plugins';
11
+
12
+ interface NgxsExecutionStrategy {
13
+ enter<T>(func: () => T): T;
14
+ leave<T>(func: () => T): T;
15
+ }
16
+
1
17
  /**
2
- * The public api for consumers of @ngxs/store
18
+ * The NGXS config settings.
3
19
  */
4
- export * from './src/public_api';
20
+ declare class NgxsConfig {
21
+ /**
22
+ * Run in development mode. This will add additional debugging features:
23
+ * - Object.freeze on the state and actions to guarantee immutability
24
+ * (default: false)
25
+ *
26
+ * Note: this property will be accounted only in development mode.
27
+ * It makes sense to use it only during development to ensure there're no state mutations.
28
+ * When building for production, the `Object.freeze` will be tree-shaken away.
29
+ */
30
+ developmentMode: boolean;
31
+ compatibility: {
32
+ /**
33
+ * Support a strict Content Security Policy.
34
+ * This will circumvent some optimisations that violate a strict CSP through the use of `new Function(...)`.
35
+ * (default: false)
36
+ */
37
+ strictContentSecurityPolicy: boolean;
38
+ };
39
+ /**
40
+ * Determines the execution context to perform async operations inside. An implementation can be
41
+ * provided to override the default behaviour where the async operations are run
42
+ * outside Angular's zone but all observable behaviours of NGXS are run back inside Angular's zone.
43
+ * These observable behaviours are from:
44
+ * `store.selectSignal(...)`, `store.select(...)`, `actions.subscribe(...)` or `store.dispatch(...).subscribe(...)`
45
+ * Every `zone.run` causes Angular to run change detection on the whole tree (`app.tick()`) so of your
46
+ * application doesn't rely on zone.js running change detection then you can switch to the
47
+ * `NoopNgxsExecutionStrategy` that doesn't interact with zones.
48
+ * (default: null)
49
+ */
50
+ executionStrategy: Type<NgxsExecutionStrategy>;
51
+ /**
52
+ * Defining shared selector options
53
+ */
54
+ selectorOptions: _SharedSelectorOptions;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsConfig, never>;
56
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxsConfig>;
57
+ }
58
+
5
59
  /**
6
- * The plugin api for the stuff that a plugins needs
60
+ * State context provided to the actions in the state.
7
61
  */
8
- export * from './src/plugin_api';
62
+ interface StateContext<T> {
63
+ /**
64
+ * Get the current state.
65
+ */
66
+ getState(): T;
67
+ /**
68
+ * Reset the state to a new value.
69
+ */
70
+ setState(val: T | StateOperator<T>): void;
71
+ /**
72
+ * Patch the existing state with the provided value.
73
+ */
74
+ patchState(val: Partial<T>): void;
75
+ /**
76
+ * Dispatch a new action and return the dispatched observable.
77
+ */
78
+ dispatch(actions: any | any[]): Observable<void>;
79
+ }
9
80
  /**
10
- * Private exports required for the compilation.
81
+ * Represents a basic change from a previous to a new value for a single state instance.
82
+ * Passed as a value in a NgxsSimpleChanges object to the ngxsOnChanges hook.
11
83
  */
12
- export * from './src/private_api';
84
+ declare class NgxsSimpleChange<T = any> {
85
+ readonly previousValue: T;
86
+ readonly currentValue: T;
87
+ readonly firstChange: boolean;
88
+ constructor(previousValue: T, currentValue: T, firstChange: boolean);
89
+ }
90
+ /**
91
+ * On init interface
92
+ */
93
+ interface NgxsOnInit {
94
+ ngxsOnInit(ctx: StateContext<any>): void;
95
+ }
96
+ /**
97
+ * On change interface
98
+ */
99
+ interface NgxsOnChanges {
100
+ ngxsOnChanges(change: NgxsSimpleChange): void;
101
+ }
102
+ /**
103
+ * After bootstrap interface
104
+ */
105
+ interface NgxsAfterBootstrap {
106
+ ngxsAfterBootstrap(ctx: StateContext<any>): void;
107
+ }
108
+ type NgxsModuleOptions = Partial<NgxsConfig>;
109
+
110
+ /**
111
+ * @ignore
112
+ */
113
+ declare class NgxsRootModule {
114
+ constructor();
115
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsRootModule, never>;
116
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsRootModule, never, never, never>;
117
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsRootModule>;
118
+ }
119
+
120
+ /**
121
+ * @ignore
122
+ */
123
+ declare class NgxsFeatureModule {
124
+ constructor();
125
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFeatureModule, never>;
126
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsFeatureModule, never, never, never>;
127
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsFeatureModule>;
128
+ }
129
+
130
+ declare class NgxsModule {
131
+ static forRoot(states?: _StateClass[], options?: NgxsModuleOptions): ModuleWithProviders<NgxsRootModule>;
132
+ static forFeature(states?: _StateClass[]): ModuleWithProviders<NgxsFeatureModule>;
133
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsModule, never>;
134
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsModule, never, never, never>;
135
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsModule>;
136
+ }
137
+
138
+ interface ActionDef<TArgs extends any[] = any[], TReturn = any> {
139
+ type: string;
140
+ new (...args: TArgs): TReturn;
141
+ }
142
+ type ActionType = ActionDef | {
143
+ type: string;
144
+ };
145
+
146
+ /**
147
+ * Given an action class, returns its payload.
148
+ */
149
+ type ActionToPayload<Action extends ActionType> = Action extends ActionDef<any, infer ActionPayload> ? ActionPayload : never;
150
+ /**
151
+ * Given a list of action classes, returns the union of their payloads.
152
+ */
153
+ type ActionsToPayload<Actions extends readonly ActionType[]> = {
154
+ [K in keyof Actions]: ActionToPayload<Actions[K]>;
155
+ }[number];
156
+ /**
157
+ * Given an action class or a list of action classes, returns the union of their payloads.
158
+ */
159
+ type ActionOrActionsToPayload<ActionOrActions> = ActionOrActions extends ActionType ? ActionToPayload<ActionOrActions> : ActionOrActions extends ActionType[] ? ActionsToPayload<ActionOrActions> : never;
160
+ /**
161
+ * Describes what methods can be decorated with an `@Action` decorator that has been passed the given action(s).
162
+ */
163
+ type HandlerTypedPropertyDescriptor<ActionOrActions> = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(stateContext: StateContext<any>) => any> | TypedPropertyDescriptor<(stateContext: StateContext<any>, action: ActionOrActionsToPayload<ActionOrActions>) => any>;
164
+ /**
165
+ * The result of a call to the `@Action()` decorator with the given action(s) as its first argument.
166
+ */
167
+ type ActionDecorator<ActionOrActions extends ActionType | ActionType[]> = (target: any, name: string | symbol, _descriptor: HandlerTypedPropertyDescriptor<ActionOrActions>) => void;
168
+ /**
169
+ * Decorates a method with action information.
170
+ */
171
+ declare function Action<ActionOrActions extends ActionType | ActionType[]>(actions: ActionOrActions, options?: _ActionOptions): ActionDecorator<ActionOrActions>;
172
+
173
+ declare class InternalNgxsExecutionStrategy implements NgxsExecutionStrategy {
174
+ private _executionStrategy;
175
+ constructor(_executionStrategy: NgxsExecutionStrategy);
176
+ enter<T>(func: () => T): T;
177
+ leave<T>(func: () => T): T;
178
+ static ɵfac: i0.ɵɵFactoryDeclaration<InternalNgxsExecutionStrategy, never>;
179
+ static ɵprov: i0.ɵɵInjectableDeclaration<InternalNgxsExecutionStrategy>;
180
+ }
181
+
182
+ type StatesByName = _PlainObjectOf<_StateClassInternal>;
183
+ interface StateOperations<T> {
184
+ getState(): T;
185
+ setState(val: T): void;
186
+ dispatch(actionOrActions: any | any[]): Observable<void>;
187
+ }
188
+ interface MappedStore {
189
+ name: string;
190
+ isInitialised: boolean;
191
+ actions: _PlainObjectOf<_ActionHandlerMetaData[]>;
192
+ defaults: any;
193
+ instance: any;
194
+ path: string;
195
+ }
196
+ interface StatesAndDefaults {
197
+ defaults: any;
198
+ states: MappedStore[];
199
+ }
200
+
201
+ /**
202
+ * Status of a dispatched action
203
+ */
204
+ declare const enum ActionStatus {
205
+ Dispatched = "DISPATCHED",
206
+ Successful = "SUCCESSFUL",
207
+ Canceled = "CANCELED",
208
+ Errored = "ERRORED"
209
+ }
210
+ interface ActionContext<T = any> {
211
+ status: ActionStatus;
212
+ action: T;
213
+ error?: Error;
214
+ }
215
+ /**
216
+ * Internal Action stream that is emitted anytime an action is dispatched.
217
+ */
218
+ declare class InternalActions extends _OrderedSubject<ActionContext> implements OnDestroy {
219
+ readonly dispatched$: Subject<ActionContext<any>>;
220
+ constructor();
221
+ ngOnDestroy(): void;
222
+ static ɵfac: i0.ɵɵFactoryDeclaration<InternalActions, never>;
223
+ static ɵprov: i0.ɵɵInjectableDeclaration<InternalActions>;
224
+ }
225
+ /**
226
+ * Action stream that is emitted anytime an action is dispatched.
227
+ *
228
+ * You can listen to this in services to react without stores.
229
+ */
230
+ declare class Actions extends Observable<ActionContext> {
231
+ constructor(internalActions$: InternalActions, internalExecutionStrategy: InternalNgxsExecutionStrategy);
232
+ static ɵfac: i0.ɵɵFactoryDeclaration<Actions, never>;
233
+ static ɵprov: i0.ɵɵInjectableDeclaration<Actions>;
234
+ }
235
+
236
+ declare class PluginManager {
237
+ readonly plugins: NgxsPluginFn[];
238
+ private readonly _parentManager;
239
+ private readonly _pluginHandlers;
240
+ constructor();
241
+ private get _rootPlugins();
242
+ private registerHandlers;
243
+ private getPluginHandlers;
244
+ static ɵfac: i0.ɵɵFactoryDeclaration<PluginManager, never>;
245
+ static ɵprov: i0.ɵɵInjectableDeclaration<PluginManager>;
246
+ }
247
+
248
+ /**
249
+ * Internal Action result stream that is emitted when an action is completed.
250
+ * This is used as a method of returning the action result to the dispatcher
251
+ * for the observable returned by the dispatch(...) call.
252
+ * The dispatcher then asynchronously pushes the result from this stream onto the main action stream as a result.
253
+ */
254
+ declare class InternalDispatchedActionResults extends Subject<ActionContext> {
255
+ static ɵfac: i0.ɵɵFactoryDeclaration<InternalDispatchedActionResults, never>;
256
+ static ɵprov: i0.ɵɵInjectableDeclaration<InternalDispatchedActionResults>;
257
+ }
258
+ declare class InternalDispatcher {
259
+ private _ngZone;
260
+ private _actions;
261
+ private _actionResults;
262
+ private _pluginManager;
263
+ private _stateStream;
264
+ private _ngxsExecutionStrategy;
265
+ constructor(_ngZone: NgZone, _actions: InternalActions, _actionResults: InternalDispatchedActionResults, _pluginManager: PluginManager, _stateStream: _StateStream, _ngxsExecutionStrategy: InternalNgxsExecutionStrategy);
266
+ /**
267
+ * Dispatches event(s).
268
+ */
269
+ dispatch(actionOrActions: any | any[]): Observable<void>;
270
+ private dispatchByEvents;
271
+ private dispatchSingle;
272
+ private getActionResultStream;
273
+ private createDispatchObservable;
274
+ static ɵfac: i0.ɵɵFactoryDeclaration<InternalDispatcher, never>;
275
+ static ɵprov: i0.ɵɵInjectableDeclaration<InternalDispatcher>;
276
+ }
277
+
278
+ /**
279
+ * @ignore
280
+ */
281
+ declare class InternalStateOperations {
282
+ private _stateStream;
283
+ private _dispatcher;
284
+ private _config;
285
+ constructor(_stateStream: _StateStream, _dispatcher: InternalDispatcher, _config: NgxsConfig);
286
+ /**
287
+ * Returns the root state operators.
288
+ */
289
+ getRootStateOperations(): StateOperations<any>;
290
+ setStateToTheCurrentWithNew(results: StatesAndDefaults): void;
291
+ static ɵfac: i0.ɵɵFactoryDeclaration<InternalStateOperations, never>;
292
+ static ɵprov: i0.ɵɵInjectableDeclaration<InternalStateOperations>;
293
+ }
294
+
295
+ /**
296
+ * The `StateFactory` class adds root and feature states to the graph.
297
+ * This extracts state names from state classes, checks if they already
298
+ * exist in the global graph, throws errors if their names are invalid, etc.
299
+ * See its constructor, state factories inject state factories that are
300
+ * parent-level providers. This is required to get feature states from the
301
+ * injector on the same level.
302
+ *
303
+ * The `NgxsModule.forFeature(...)` returns `providers: [StateFactory, ...states]`.
304
+ * The `StateFactory` is initialized on the feature level and goes through `...states`
305
+ * to get them from the injector through `injector.get(state)`.
306
+ * @ignore
307
+ */
308
+ declare class StateFactory implements OnDestroy {
309
+ private readonly _injector;
310
+ private readonly _config;
311
+ private readonly _parentFactory;
312
+ private readonly _stateContextFactory;
313
+ private readonly _actions;
314
+ private readonly _actionResults;
315
+ private readonly _initialState;
316
+ private readonly _actionRegistry;
317
+ private readonly _propGetter;
318
+ private _actionsSubscription;
319
+ private _ngxsUnhandledErrorHandler;
320
+ private _states;
321
+ get states(): MappedStore[];
322
+ private _statesByName;
323
+ get statesByName(): StatesByName;
324
+ private _statePaths;
325
+ private get statePaths();
326
+ getRuntimeSelectorContext: () => _RuntimeSelectorContext;
327
+ ngOnDestroy(): void;
328
+ /**
329
+ * Add a new state to the global defs.
330
+ */
331
+ add(stateClasses: _StateClassInternal[]): MappedStore[];
332
+ /**
333
+ * Add a set of states to the store and return the defaults
334
+ */
335
+ addAndReturnDefaults(stateClasses: _StateClassInternal[]): StatesAndDefaults;
336
+ connectActionHandlers(): void;
337
+ /**
338
+ * Invoke actions on the states.
339
+ */
340
+ invokeActions(action: any): rxjs.Observable<[void | Promise<void> | rxjs.Observable<unknown>]>;
341
+ private addToStatesMap;
342
+ private addRuntimeInfoToMeta;
343
+ private hasBeenMountedAndBootstrapped;
344
+ private hydrateActionMetasMap;
345
+ static ɵfac: i0.ɵɵFactoryDeclaration<StateFactory, never>;
346
+ static ɵprov: i0.ɵɵInjectableDeclaration<StateFactory>;
347
+ }
348
+
349
+ type ɵSelectorFunc<TModel> = (...arg: any[]) => TModel;
350
+ type TypedSelector<TModel> = StateToken<TModel> | ɵSelectorFunc<TModel>;
351
+ type ɵStateSelector = _StateClass<any>;
352
+ type ɵSelectorDef<TModel> = ɵStateSelector | TypedSelector<TModel>;
353
+ type ɵSelectorReturnType<T extends ɵSelectorDef<any>> = T extends StateToken<infer R1> ? R1 : T extends ɵSelectorFunc<infer R2> ? R2 : T extends _StateClass<any> ? any : never;
354
+
355
+ interface SelectorMap$1 {
356
+ [key: string]: TypedSelector<any>;
357
+ }
358
+ type ModelSelector<T extends SelectorMap$1> = (...args: any[]) => MappedResult<T>;
359
+ type MappedResult<TSelectorMap> = {
360
+ [P in keyof TSelectorMap]: TSelectorMap[P] extends TypedSelector<infer R> ? R : never;
361
+ };
362
+ declare function createModelSelector<T extends SelectorMap$1>(selectorMap: T): ModelSelector<T>;
363
+
364
+ type KeysToValues<T, Keys extends (keyof T)[]> = {
365
+ [Index in keyof Keys]: Keys[Index] extends keyof T ? T[Keys[Index]] : never;
366
+ };
367
+ declare function createPickSelector<TModel, Keys extends (keyof TModel)[]>(selector: TypedSelector<TModel>, keys: [...Keys]): (...props: KeysToValues<TModel, Keys>) => Pick<TModel, Keys[number]>;
368
+
369
+ type PropertySelectors<TModel> = {
370
+ [P in keyof NonNullable<TModel>]-?: (model: TModel) => TModel extends null | undefined ? undefined : NonNullable<TModel>[P];
371
+ };
372
+ declare function createPropertySelectors<TModel>(parentSelector: ɵSelectorDef<TModel>): PropertySelectors<TModel>;
373
+
374
+ interface CreationMetadata {
375
+ containerClass: any;
376
+ selectorName: string;
377
+ getSelectorOptions?: () => _SharedSelectorOptions;
378
+ }
379
+
380
+ type SelectorArg = ɵSelectorDef<any>;
381
+ /**
382
+ * Function for creating a selector
383
+ * @param selectors The selectors to use to create the arguments of this function
384
+ * @param originalFn The original function being made into a selector
385
+ * @param creationMetadata
386
+ */
387
+ declare function createSelector<S1 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>) => any>(selectors: [S1], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
388
+ declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>) => any>(selectors: [S1, S2], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
389
+ declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>) => any>(selectors: [S1, S2, S3], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
390
+ declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>) => any>(selectors: [S1, S2, S3, S4], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
391
+ declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>, s5: ɵSelectorReturnType<S5>) => any>(selectors: [S1, S2, S3, S4, S5], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
392
+ declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>, s5: ɵSelectorReturnType<S5>, s6: ɵSelectorReturnType<S6>) => any>(selectors: [S1, S2, S3, S4, S5, S6], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
393
+ declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, S7 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>, s5: ɵSelectorReturnType<S5>, s6: ɵSelectorReturnType<S6>, s7: ɵSelectorReturnType<S7>) => any>(selectors: [S1, S2, S3, S4, S5, S6, S7], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
394
+ declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, S7 extends SelectorArg, S8 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>, s5: ɵSelectorReturnType<S5>, s6: ɵSelectorReturnType<S6>, s7: ɵSelectorReturnType<S7>, s8: ɵSelectorReturnType<S8>) => any>(selectors: [S1, S2, S3, S4, S5, S6, S7, S8], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
395
+ declare function createSelector<T extends (...args: any[]) => any>(selectors: SelectorArg[] | undefined, projector: T, creationMetadata?: Partial<CreationMetadata>): T;
396
+
397
+ declare class Store {
398
+ private _stateStream;
399
+ private _internalStateOperations;
400
+ private _config;
401
+ private _internalExecutionStrategy;
402
+ private _stateFactory;
403
+ /**
404
+ * This is a derived state stream that leaves NGXS execution strategy to emit state changes within the Angular zone,
405
+ * because state is being changed actually within the `<root>` zone, see `InternalDispatcher#dispatchSingle`.
406
+ * All selects would use this stream, and it would call leave only once for any state change across all active selectors.
407
+ */
408
+ private _selectableStateStream;
409
+ constructor(_stateStream: _StateStream, _internalStateOperations: InternalStateOperations, _config: NgxsConfig, _internalExecutionStrategy: InternalNgxsExecutionStrategy, _stateFactory: StateFactory, initialStateValue: any);
410
+ /**
411
+ * Dispatches event(s).
412
+ */
413
+ dispatch(actionOrActions: any | any[]): Observable<void>;
414
+ /**
415
+ * Selects a slice of data from the store.
416
+ */
417
+ select<T>(selector: TypedSelector<T>): Observable<T>;
418
+ /**
419
+ * Select one slice of data from the store.
420
+ */
421
+ selectOnce<T>(selector: TypedSelector<T>): Observable<T>;
422
+ /**
423
+ * Select a snapshot from the state.
424
+ */
425
+ selectSnapshot<T>(selector: TypedSelector<T>): T;
426
+ /**
427
+ * Select a signal from the state.
428
+ */
429
+ selectSignal<T>(selector: TypedSelector<T>): Signal<T>;
430
+ /**
431
+ * Allow the user to subscribe to the root of the state
432
+ */
433
+ subscribe(fn?: (value: any) => void): Subscription;
434
+ /**
435
+ * Return the raw value of the state.
436
+ */
437
+ snapshot(): any;
438
+ /**
439
+ * Reset the state to a specific point in time. This method is useful
440
+ * for plugin's who need to modify the state directly or unit testing.
441
+ */
442
+ reset(state: any): void;
443
+ private getStoreBoundSelectorFn;
444
+ private initStateStream;
445
+ static ɵfac: i0.ɵɵFactoryDeclaration<Store, [null, null, null, null, null, { optional: true; }]>;
446
+ static ɵprov: i0.ɵɵInjectableDeclaration<Store>;
447
+ }
448
+
449
+ /**
450
+ * Decorates a class with ngxs state information.
451
+ */
452
+ declare function State<T>(options: _StoreOptions<T>): (target: _StateClass) => void;
453
+
454
+ /**
455
+ * Decorator for selecting a slice of state from the store.
456
+ *
457
+ * @deprecated
458
+ * Read the deprecation notice at this link: https://ngxs.io/deprecations/select-decorator-deprecation.
459
+ */
460
+ declare function Select<T>(rawSelector?: T, ...paths: string[]): PropertyDecorator;
461
+
462
+ /**
463
+ * Decorator for setting selector options at a method or class level.
464
+ */
465
+ declare function SelectorOptions(options: _SharedSelectorOptions): ClassDecorator & MethodDecorator;
466
+
467
+ type TupleKeys<T extends any[]> = Exclude<keyof T, keyof []>;
468
+ /**
469
+ * Given a POJO, returns the POJO type, given a class constructor object, returns the type of the class.
470
+ *
471
+ * This utility type exists due to the complexity of ActionType being either an ActionDef class or the plain
472
+ * `{ type: string }` type (or similar compatible POJO types).
473
+ */
474
+ type Constructed<T> = T extends new (...args: any[]) => infer U ? U : T;
475
+ interface ActionCompletion<T = any, E = Error> {
476
+ action: T;
477
+ result: {
478
+ successful: boolean;
479
+ canceled: boolean;
480
+ error?: E;
481
+ };
482
+ }
483
+ /**
484
+ * RxJS operator for selecting out specific actions.
485
+ *
486
+ * This will grab actions that have just been dispatched as well as actions that have completed
487
+ */
488
+ declare function ofAction<T extends ActionType[]>(...allowedTypes: T): OperatorFunction<ActionContext<Constructed<T[TupleKeys<T>]>>, Constructed<T[TupleKeys<T>]>>;
489
+ /**
490
+ * RxJS operator for selecting out specific actions.
491
+ *
492
+ * This will ONLY grab actions that have just been dispatched
493
+ */
494
+ declare function ofActionDispatched<T extends ActionType[]>(...allowedTypes: T): OperatorFunction<ActionContext<Constructed<T[TupleKeys<T>]>>, Constructed<T[TupleKeys<T>]>>;
495
+ /**
496
+ * RxJS operator for selecting out specific actions.
497
+ *
498
+ * This will ONLY grab actions that have just been successfully completed
499
+ */
500
+ declare function ofActionSuccessful<T extends ActionType[]>(...allowedTypes: T): OperatorFunction<ActionContext<Constructed<T[TupleKeys<T>]>>, Constructed<T[TupleKeys<T>]>>;
501
+ /**
502
+ * RxJS operator for selecting out specific actions.
503
+ *
504
+ * This will ONLY grab actions that have just been canceled
505
+ */
506
+ declare function ofActionCanceled<T extends ActionType[]>(...allowedTypes: T): OperatorFunction<ActionContext<Constructed<T[TupleKeys<T>]>>, Constructed<T[TupleKeys<T>]>>;
507
+ /**
508
+ * RxJS operator for selecting out specific actions.
509
+ *
510
+ * This will ONLY grab actions that have just been completed
511
+ */
512
+ declare function ofActionCompleted<T extends ActionType[]>(...allowedTypes: T): OperatorFunction<ActionContext<Constructed<T[TupleKeys<T>]>>, ActionCompletion<Constructed<T[TupleKeys<T>]>>>;
513
+ /**
514
+ * RxJS operator for selecting out specific actions.
515
+ *
516
+ * This will ONLY grab actions that have just thrown an error
517
+ */
518
+ declare function ofActionErrored<T extends ActionType[]>(...allowedTypes: T): OperatorFunction<ActionContext<Constructed<T[TupleKeys<T>]>>, ActionCompletion<Constructed<T[TupleKeys<T>]>>>;
519
+
520
+ /**
521
+ * Defines a tuple of selector functions, state tokens, and state classes that a selector decorated
522
+ * by `@Selector()` can depend on.
523
+ */
524
+ type SelectorDefTuple = ɵSelectorDef<any>[] | [ɵSelectorDef<any>];
525
+ type UnknownToAny<T> = unknown extends T ? any : T;
526
+ type EnsureArray<T> = T extends any[] ? T : never;
527
+ /**
528
+ * Given a tuple of selector functions, state tokens, state classes, etc., returns a tuple of what
529
+ * a dependent selector would expect to receive for that parent as an argument when called.
530
+ *
531
+ * For example, if the first element in `ParentsTuple` is a selector function that returns a
532
+ * `number`, then the first element of the result tuple will be `number`. If the second element
533
+ * in `ParentsTuple` is a state class with model `{ name: string }`, then the second element of
534
+ * the result tuple will be `{ name: string }`.
535
+ */
536
+ type SelectorReturnTypeList<ParentsTuple extends SelectorDefTuple> = EnsureArray<{
537
+ [ParentsTupleIndex in keyof ParentsTuple]: ParentsTuple[ParentsTupleIndex] extends ɵSelectorDef<any> ? UnknownToAny<ɵSelectorReturnType<ParentsTuple[ParentsTupleIndex]>> : never;
538
+ }>;
539
+ /**
540
+ * Defines a selector function matching a given argument list of parent selectors/states/tokens
541
+ * and a given return type.
542
+ */
543
+ type SelectorSpec<ParentsTuple, Return> = ParentsTuple extends [] ? () => any : ParentsTuple extends SelectorDefTuple ? (...states: SelectorReturnTypeList<ParentsTuple>) => Return : () => any;
544
+ /**
545
+ * Defines a selector function matching `SelectorSpec<ParentsTuple, Return>` but with the assumption that the
546
+ * container state has been injected as the first argument.
547
+ */
548
+ type SelectorSpecWithInjectedState<ParentsTuple, Return> = SelectorSpec<ParentsTuple extends SelectorDefTuple ? [any, ...ParentsTuple] : [any], ParentsTuple extends SelectorDefTuple ? Return : any>;
549
+ /**
550
+ * Defines a property descriptor for the `@Selector` decorator that decorates a function with
551
+ * parent selectors/states/tokens `ParentsTuple` and return type `Return`.
552
+ */
553
+ type DescriptorWithNoInjectedState<ParentsTuple, Return> = TypedPropertyDescriptor<SelectorSpec<ParentsTuple, Return>>;
554
+ /**
555
+ * Same as `DescriptorWithNoInjectedState` but with state injected as the first argument.
556
+ */
557
+ type DescriptorWithInjectedState<ParentsTuple, Return> = TypedPropertyDescriptor<SelectorSpecWithInjectedState<ParentsTuple, Return>>;
558
+ type DecoratorArgs<Descriptor> = [target: any, key: string | symbol, descriptor?: Descriptor];
559
+ /**
560
+ * Defines the return type of a call to `@Selector` when there is no argument given
561
+ * (e.g. `@Selector()` counts, but `@Selector([])` does not)
562
+ *
563
+ * This result is a decorator that can only be used to decorate a function with no arguments or a
564
+ * single argument that is the container state.
565
+ */
566
+ type SelectorTypeNoDecoratorArgs = {
567
+ <Return>(...args: DecoratorArgs<DescriptorWithNoInjectedState<unknown, Return>>): void | DescriptorWithNoInjectedState<unknown, Return>;
568
+ <Return>(...args: DecoratorArgs<DescriptorWithInjectedState<unknown, Return>>): void | DescriptorWithInjectedState<unknown, Return>;
569
+ };
570
+ /**
571
+ * Defines the return type of a call to `@Selector` when there is an argument given.
572
+ * (e.g. `@Selector([])` counts, but `@Selector()` does not)
573
+ *
574
+ * This result is a decorator that can only be used to decorate a function with an argument list
575
+ * matching the results of the tuple of parents `ParentsTuple`.
576
+ */
577
+ type SelectorTypeWithDecoratorArgs<ParentsTuple> = {
578
+ <Return>(...args: DecoratorArgs<DescriptorWithNoInjectedState<ParentsTuple, Return>>): void | DescriptorWithNoInjectedState<ParentsTuple, Return>;
579
+ /**
580
+ * @deprecated
581
+ * Read the deprecation notice at this link: https://ngxs.io/deprecations/inject-container-state-deprecation.md.
582
+ */
583
+ <Return>(...args: DecoratorArgs<DescriptorWithInjectedState<ParentsTuple, Return>>): void | DescriptorWithInjectedState<ParentsTuple, Return>;
584
+ };
585
+ /**
586
+ * Defines the return type of a call to `@Selector`. This result is a decorator that can only be
587
+ * used to decorate a function with an argument list matching `ParentsTuple`, the results of the
588
+ * tuple of parent selectors/state tokens/state classes.
589
+ */
590
+ type SelectorType<ParentsTuple> = unknown extends ParentsTuple ? SelectorTypeNoDecoratorArgs : SelectorTypeWithDecoratorArgs<ParentsTuple>;
591
+
592
+ /**
593
+ * Decorator for creating a state selector for the current state.
594
+ */
595
+ declare function Selector(): SelectorType<unknown>;
596
+ /**
597
+ * Decorator for creating a state selector from the provided selectors (and optionally the container State, depending on the applicable Selector Options).
598
+ */
599
+ declare function Selector<T extends SelectorDefTuple>(selectors: T): SelectorType<T>;
600
+
601
+ declare class NoopNgxsExecutionStrategy implements NgxsExecutionStrategy {
602
+ enter<T>(func: () => T): T;
603
+ leave<T>(func: () => T): T;
604
+ static ɵfac: i0.ɵɵFactoryDeclaration<NoopNgxsExecutionStrategy, never>;
605
+ static ɵprov: i0.ɵɵInjectableDeclaration<NoopNgxsExecutionStrategy>;
606
+ }
607
+
608
+ interface NgxsUnhandledErrorContext {
609
+ action: any;
610
+ }
611
+ declare class NgxsUnhandledErrorHandler {
612
+ private _ngZone;
613
+ private _errorHandler;
614
+ /**
615
+ * The `_unhandledErrorContext` is left unused internally since we do not
616
+ * require it for internal operations. However, developers who wish to provide
617
+ * their own custom error handler may utilize this context information.
618
+ */
619
+ handleError(error: any, _unhandledErrorContext: NgxsUnhandledErrorContext): void;
620
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsUnhandledErrorHandler, never>;
621
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxsUnhandledErrorHandler>;
622
+ }
623
+
624
+ interface NgxsDevelopmentOptions {
625
+ warnOnUnhandledActions: true | {
626
+ ignore: ActionType[];
627
+ };
628
+ }
629
+
630
+ declare class NgxsDevelopmentModule {
631
+ static forRoot(options: NgxsDevelopmentOptions): ModuleWithProviders<NgxsDevelopmentModule>;
632
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsDevelopmentModule, never>;
633
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsDevelopmentModule, never, never, never>;
634
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsDevelopmentModule>;
635
+ }
636
+ declare function withNgxsDevelopmentOptions(options: NgxsDevelopmentOptions): i0.EnvironmentProviders;
637
+
638
+ declare class NgxsUnhandledActionsLogger {
639
+ /**
640
+ * These actions should be ignored by default; the user can increase this
641
+ * list in the future via the `ignoreActions` method.
642
+ */
643
+ private _ignoredActions;
644
+ constructor(options: NgxsDevelopmentOptions);
645
+ /**
646
+ * Adds actions to the internal list of actions that should be ignored.
647
+ */
648
+ ignoreActions(...actions: ActionType[]): void;
649
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsUnhandledActionsLogger, never>;
650
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxsUnhandledActionsLogger>;
651
+ }
652
+
653
+ /**
654
+ * This function provides global store providers and initializes the store.
655
+ *
656
+ * ```ts
657
+ * bootstrapApplication(AppComponent, {
658
+ * providers: [provideStore([CountriesState])]
659
+ * });
660
+ * ```
661
+ *
662
+ * The `provideStore` may be optionally called with a config before the list of features:
663
+ *
664
+ * ```ts
665
+ * provideStore([CountriesState], {
666
+ * developmentMode: !environment.production
667
+ * });
668
+ * ```
669
+ */
670
+ declare function provideStore(states?: _StateClass[], ...features: EnvironmentProviders[]): EnvironmentProviders;
671
+ declare function provideStore(states?: _StateClass[], options?: NgxsModuleOptions, ...features: EnvironmentProviders[]): EnvironmentProviders;
672
+
673
+ /**
674
+ * This version serves as a standalone alternative to `NgxsModule.forFeature`.
675
+ * It can be used in a similar manner to register feature states, but at the
676
+ * `Route` providers level:
677
+ *
678
+ * ```ts
679
+ * const routes: Routes = [
680
+ * {
681
+ * path: 'products',
682
+ * loadComponent: async () => {...},
683
+ * providers: [provideStates([ProductsState])]
684
+ * }
685
+ * ];
686
+ * ```
687
+ */
688
+ declare function provideStates(states: _StateClass[], ...features: EnvironmentProviders[]): EnvironmentProviders;
689
+
690
+ /**
691
+ * This function registers a custom global plugin for the state.
692
+ *
693
+ * ```ts
694
+ * bootstrapApplication(AppComponent, {
695
+ * providers: [
696
+ * provideStore(
697
+ * [CountriesState],
698
+ * withNgxsPlugin(LogoutPlugin)
699
+ * )
700
+ * ]
701
+ * });
702
+ * ```
703
+ */
704
+ declare function withNgxsPlugin(plugin: Type<NgxsPlugin>): EnvironmentProviders;
705
+
706
+ /**
707
+ * This function registers a preboot function which will be called before the root
708
+ * store initializer is run, but after all of the NGXS features are provided and
709
+ * available for injection. This is useful for registering action stream listeners
710
+ * before any action is dispatched.
711
+ *
712
+ * ```ts
713
+ * bootstrapApplication(AppComponent, {
714
+ * providers: [
715
+ * provideStore(
716
+ * [CountriesState],
717
+ * withNgxsPreboot(() => {
718
+ * const actions$ = inject(Actions);
719
+ * actions$.subscribe(ctx => console.log(ctx));
720
+ * })
721
+ * )
722
+ * ]
723
+ * });
724
+ * ```
725
+ */
726
+ declare function withNgxsPreboot(prebootFn: VoidFunction): i0.EnvironmentProviders;
727
+
728
+ /**
729
+ * This function serves as a utility and has multiple purposes.
730
+ * Firstly, it allows you to select properties from the state class
731
+ * without having to inject the store class and use `this.store.selectSignal`,
732
+ * resulting in a more concise implementation. Secondly, it can be used with
733
+ * other solutions such as NgRx signal store with its `signalStoreFeature` or
734
+ * `withComputed` functionalities.
735
+ *
736
+ * Please note that it's named `select` instead of `selectSignal` because
737
+ * signals are evolving into first-class primitives in Angular, displacing other
738
+ * primitives such as observables. Observables represent a stream of events,
739
+ * whereas signals represent a single value changing over time.
740
+ */
741
+ declare function select<T>(selector: TypedSelector<T>): Signal<T>;
742
+
743
+ declare function dispatch<TArgs extends any[]>(ActionType: ActionDef<TArgs>): (...args: TArgs) => rxjs.Observable<void>;
744
+
745
+ type SelectorMap = Record<string, TypedSelector<unknown>>;
746
+ declare function createSelectMap<T extends SelectorMap>(selectorMap: T): { readonly [K in keyof T]: Signal<ɵSelectorReturnType<T[K]>>; };
747
+
748
+ type ActionMap = Record<string, ActionDef<any>>;
749
+ declare function createDispatchMap<T extends ActionMap>(actionMap: T): { readonly [K in keyof T]: (...args: ConstructorParameters<T[K]>) => Observable<void>; };
750
+
751
+ export { Action, type ActionCompletion, type ActionContext, type ActionDef, type ActionMap, ActionStatus, type ActionType, Actions, type NgxsAfterBootstrap, NgxsConfig, NgxsDevelopmentModule, type NgxsDevelopmentOptions, type NgxsExecutionStrategy, NgxsModule, type NgxsModuleOptions, type NgxsOnChanges, type NgxsOnInit, NgxsSimpleChange, NgxsUnhandledActionsLogger, type NgxsUnhandledErrorContext, NgxsUnhandledErrorHandler, NoopNgxsExecutionStrategy, type PropertySelectors, Select, Selector, type SelectorMap, SelectorOptions, State, type StateContext, Store, type TypedSelector, createDispatchMap, createModelSelector, createPickSelector, createPropertySelectors, createSelectMap, createSelector, dispatch, ofAction, ofActionCanceled, ofActionCompleted, ofActionDispatched, ofActionErrored, ofActionSuccessful, provideStates, provideStore, select, withNgxsDevelopmentOptions, withNgxsPlugin, withNgxsPreboot, NgxsFeatureModule as ɵNgxsFeatureModule, NgxsRootModule as ɵNgxsRootModule, type ɵSelectorDef, type ɵSelectorFunc, type ɵSelectorReturnType, type ɵStateSelector };