@ngxs/store 3.8.2-dev.master-3bbb9e1 → 3.8.2-dev.master-450c70c
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/esm2022/src/standalone-features/index.mjs +2 -1
- package/esm2022/src/standalone-features/initializers.mjs +4 -1
- package/esm2022/src/standalone-features/preboot.mjs +32 -0
- package/fesm2022/ngxs-store.mjs +55 -22
- package/fesm2022/ngxs-store.mjs.map +1 -1
- package/index.d.ts +23 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -624,6 +624,28 @@ declare function provideStates(states: _StateClass[], ...features: EnvironmentPr
|
|
|
624
624
|
*/
|
|
625
625
|
declare function withNgxsPlugin(plugin: Type<NgxsPlugin>): EnvironmentProviders;
|
|
626
626
|
|
|
627
|
+
/**
|
|
628
|
+
* This function registers a preboot function which will be called before the root
|
|
629
|
+
* store initializer is run, but after all of the NGXS features are provided and
|
|
630
|
+
* available for injection. This is useful for registering action stream listeners
|
|
631
|
+
* before any action is dispatched.
|
|
632
|
+
*
|
|
633
|
+
* ```ts
|
|
634
|
+
* bootstrapApplication(AppComponent, {
|
|
635
|
+
* providers: [
|
|
636
|
+
* provideStore(
|
|
637
|
+
* [CountriesState],
|
|
638
|
+
* withNgxsPreboot(() => {
|
|
639
|
+
* const actions$ = inject(Actions);
|
|
640
|
+
* actions$.subscribe(ctx => console.log(ctx));
|
|
641
|
+
* })
|
|
642
|
+
* )
|
|
643
|
+
* ]
|
|
644
|
+
* });
|
|
645
|
+
* ```
|
|
646
|
+
*/
|
|
647
|
+
declare function withNgxsPreboot(prebootFn: VoidFunction): i0.EnvironmentProviders;
|
|
648
|
+
|
|
627
649
|
/**
|
|
628
650
|
* This function serves as a utility and has multiple purposes.
|
|
629
651
|
* Firstly, it allows you to select properties from the state class
|
|
@@ -647,4 +669,4 @@ declare function createSelectMap<T extends SelectorMap>(selectorMap: T): { reado
|
|
|
647
669
|
type ActionMap = Record<string, ActionDef<any>>;
|
|
648
670
|
declare function createDispatchMap<T extends ActionMap>(actionMap: T): { readonly [K in keyof T]: (...args: ConstructorParameters<T[K]>) => Observable<void>; };
|
|
649
671
|
|
|
650
|
-
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, NgxsFeatureModule as ɵNgxsFeatureModule, NgxsRootModule as ɵNgxsRootModule, type ɵSelectorDef, type ɵSelectorFunc, type ɵSelectorReturnType, type ɵStateSelector };
|
|
672
|
+
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 };
|