1 | import { ModuleWithProviders, OnDestroy, InjectionToken, Injector } from '@angular/core';
|
2 | import { Action, ActionReducer, ActionReducerMap, ActionReducerFactory, StoreFeature, InitialState, MetaReducer, RuntimeChecks } from './models';
|
3 | import { ActionsSubject } from './actions_subject';
|
4 | import { ReducerManager, ReducerObservable } from './reducer_manager';
|
5 | import { ScannedActionsSubject } from './scanned_actions_subject';
|
6 | import { Store } from './store';
|
7 | import * as i0 from "@angular/core";
|
8 | export declare class StoreRootModule {
|
9 | constructor(actions$: ActionsSubject, reducer$: ReducerObservable, scannedActions$: ScannedActionsSubject, store: Store<any>, guard: any, actionCheck: any);
|
10 | static ɵfac: i0.ɵɵFactoryDeclaration<StoreRootModule, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
11 | static ɵmod: i0.ɵɵNgModuleDeclaration<StoreRootModule, never, never, never>;
|
12 | static ɵinj: i0.ɵɵInjectorDeclaration<StoreRootModule>;
|
13 | }
|
14 | export declare class StoreFeatureModule implements OnDestroy {
|
15 | private features;
|
16 | private featureReducers;
|
17 | private reducerManager;
|
18 | constructor(features: StoreFeature<any, any>[], featureReducers: ActionReducerMap<any>[], reducerManager: ReducerManager, root: StoreRootModule, actionCheck: any);
|
19 | ngOnDestroy(): void;
|
20 | static ɵfac: i0.ɵɵFactoryDeclaration<StoreFeatureModule, [null, null, null, null, { optional: true; }]>;
|
21 | static ɵmod: i0.ɵɵNgModuleDeclaration<StoreFeatureModule, never, never, never>;
|
22 | static ɵinj: i0.ɵɵInjectorDeclaration<StoreFeatureModule>;
|
23 | }
|
24 | export interface StoreConfig<T, V extends Action = Action> {
|
25 | initialState?: InitialState<T>;
|
26 | reducerFactory?: ActionReducerFactory<T, V>;
|
27 | metaReducers?: MetaReducer<{
|
28 | [P in keyof T]: T[P];
|
29 | }, V>[];
|
30 | }
|
31 | export interface RootStoreConfig<T, V extends Action = Action> extends StoreConfig<T, V> {
|
32 | runtimeChecks?: Partial<RuntimeChecks>;
|
33 | }
|
34 |
|
35 |
|
36 |
|
37 | export interface FeatureSlice<T, V extends Action = Action> {
|
38 | name: string;
|
39 | reducer: ActionReducer<T, V>;
|
40 | }
|
41 | export declare class StoreModule {
|
42 | static forRoot<T, V extends Action = Action>(reducers: ActionReducerMap<T, V> | InjectionToken<ActionReducerMap<T, V>>, config?: RootStoreConfig<T, V>): ModuleWithProviders<StoreRootModule>;
|
43 | static forFeature<T, V extends Action = Action>(featureName: string, reducers: ActionReducerMap<T, V> | InjectionToken<ActionReducerMap<T, V>>, config?: StoreConfig<T, V> | InjectionToken<StoreConfig<T, V>>): ModuleWithProviders<StoreFeatureModule>;
|
44 | static forFeature<T, V extends Action = Action>(featureName: string, reducer: ActionReducer<T, V> | InjectionToken<ActionReducer<T, V>>, config?: StoreConfig<T, V> | InjectionToken<StoreConfig<T, V>>): ModuleWithProviders<StoreFeatureModule>;
|
45 | static forFeature<T, V extends Action = Action>(slice: FeatureSlice<T, V>): ModuleWithProviders<StoreFeatureModule>;
|
46 | static ɵfac: i0.ɵɵFactoryDeclaration<StoreModule, never>;
|
47 | static ɵmod: i0.ɵɵNgModuleDeclaration<StoreModule, never, never, never>;
|
48 | static ɵinj: i0.ɵɵInjectorDeclaration<StoreModule>;
|
49 | }
|
50 | export declare function _createStoreReducers(injector: Injector, reducers: ActionReducerMap<any, any>): unknown;
|
51 | export declare function _createFeatureStore(injector: Injector, configs: StoreConfig<any, any>[] | InjectionToken<StoreConfig<any, any>>[], featureStores: StoreFeature<any, any>[]): (StoreFeature<any, any> | {
|
52 | key: string;
|
53 | reducerFactory: any;
|
54 | metaReducers: any;
|
55 | initialState: any;
|
56 | })[];
|
57 | export declare function _createFeatureReducers(injector: Injector, reducerCollection: ActionReducerMap<any, any>[]): unknown[];
|
58 | export declare function _initialStateFactory(initialState: any): any;
|
59 | export declare function _concatMetaReducers(metaReducers: MetaReducer[], userProvidedMetaReducers: MetaReducer[]): MetaReducer[];
|
60 | export declare function _provideForRootGuard(store: Store<any>): any;
|