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 | export declare class StoreRootModule {
|
8 | constructor(actions$: ActionsSubject, reducer$: ReducerObservable, scannedActions$: ScannedActionsSubject, store: Store<any>, guard: any, actionCheck: any);
|
9 | }
|
10 | export declare class StoreFeatureModule implements OnDestroy {
|
11 | private features;
|
12 | private featureReducers;
|
13 | private reducerManager;
|
14 | constructor(features: StoreFeature<any, any>[], featureReducers: ActionReducerMap<any>[], reducerManager: ReducerManager, root: StoreRootModule, actionCheck: any);
|
15 | ngOnDestroy(): void;
|
16 | }
|
17 | export interface StoreConfig<T, V extends Action = Action> {
|
18 | initialState?: InitialState<T>;
|
19 | reducerFactory?: ActionReducerFactory<T, V>;
|
20 | metaReducers?: MetaReducer<T, V>[];
|
21 | }
|
22 | export interface RootStoreConfig<T, V extends Action = Action> extends StoreConfig<T, V> {
|
23 | runtimeChecks?: Partial<RuntimeChecks>;
|
24 | }
|
25 |
|
26 |
|
27 |
|
28 | export interface FeatureSlice<T, V extends Action = Action> {
|
29 | name: string;
|
30 | reducer: ActionReducer<T, V>;
|
31 | }
|
32 | export declare class StoreModule {
|
33 | static forRoot<T, V extends Action = Action>(reducers: ActionReducerMap<T, V> | InjectionToken<ActionReducerMap<T, V>>, config?: RootStoreConfig<T, V>): ModuleWithProviders<StoreRootModule>;
|
34 | 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>;
|
35 | 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>;
|
36 | static forFeature<T, V extends Action = Action>(slice: FeatureSlice<T, V>, config?: StoreConfig<T, V> | InjectionToken<StoreConfig<T, V>>): ModuleWithProviders<StoreFeatureModule>;
|
37 | }
|
38 | export declare function _createStoreReducers(injector: Injector, reducers: ActionReducerMap<any, any>): unknown;
|
39 | export declare function _createFeatureStore(injector: Injector, configs: StoreConfig<any, any>[] | InjectionToken<StoreConfig<any, any>>[], featureStores: StoreFeature<any, any>[]): (StoreFeature<any, any> | {
|
40 | key: string;
|
41 | reducerFactory: any;
|
42 | metaReducers: any;
|
43 | initialState: any;
|
44 | })[];
|
45 | export declare function _createFeatureReducers(injector: Injector, reducerCollection: ActionReducerMap<any, any>[]): unknown[];
|
46 | export declare function _initialStateFactory(initialState: any): any;
|
47 | export declare function _concatMetaReducers(metaReducers: MetaReducer[], userProvidedMetaReducers: MetaReducer[]): MetaReducer[];
|
48 | export declare function _provideForRootGuard(store: Store<any>): any;
|