UNPKG

1.87 kBTypeScriptView Raw
1import { EnvironmentProviders, InjectionToken, Provider } from '@angular/core';
2import { Action, ActionReducer, ActionReducerMap } from './models';
3import { FeatureSlice, RootStoreConfig, StoreConfig } from './store_config';
4export declare function provideState<T, V extends Action = Action>(featureName: string, reducers: ActionReducerMap<T, V> | InjectionToken<ActionReducerMap<T, V>>, config?: StoreConfig<T, V> | InjectionToken<StoreConfig<T, V>>): EnvironmentProviders;
5export declare function provideState<T, V extends Action = Action>(featureName: string, reducer: ActionReducer<T, V> | InjectionToken<ActionReducer<T, V>>, config?: StoreConfig<T, V> | InjectionToken<StoreConfig<T, V>>): EnvironmentProviders;
6export declare function provideState<T, V extends Action = Action>(slice: FeatureSlice<T, V>): EnvironmentProviders;
7export declare function _provideStore<T, V extends Action = Action>(reducers?: ActionReducerMap<T, V> | InjectionToken<ActionReducerMap<T, V>> | Record<string, never>, config?: RootStoreConfig<T, V>): Provider[];
8/**
9 * Provides the global Store providers and initializes
10 * the Store.
11 * These providers cannot be used at the component level.
12 *
13 * @usageNotes
14 *
15 * ### Providing the Global Store
16 *
17 * ```ts
18 * bootstrapApplication(AppComponent, {
19 * providers: [provideStore()],
20 * });
21 * ```
22 */
23export declare function provideStore<T, V extends Action = Action>(reducers?: ActionReducerMap<T, V> | InjectionToken<ActionReducerMap<T, V>>, config?: RootStoreConfig<T, V>): EnvironmentProviders;
24export declare function _provideState<T, V extends Action = Action>(featureNameOrSlice: string | FeatureSlice<T, V>, reducers?: ActionReducerMap<T, V> | InjectionToken<ActionReducerMap<T, V>> | ActionReducer<T, V> | InjectionToken<ActionReducer<T, V>>, config?: StoreConfig<T, V> | InjectionToken<StoreConfig<T, V>>): Provider[];