import * as i0 from '@angular/core'; import { ValueEqualityFn, OnDestroy, Injector, Signal, EffectRef, InjectionToken, ModuleWithProviders, EnvironmentProviders } from '@angular/core'; import { BehaviorSubject, Observable, Subject, Observer, Operator } from 'rxjs'; interface Action { type: Type; } type ActionType = A extends ActionCreator ? ReturnType & { type: T; } : never; type TypeId = () => T; type InitialState = Partial | TypeId> | void; /** * A function that takes an `Action` and a `State`, and returns a `State`. * See `createReducer`. */ interface ActionReducer { (state: T | undefined, action: V): T; } type ActionReducerMap = { [p in keyof T]: ActionReducer; }; interface ActionReducerFactory { (reducerMap: ActionReducerMap, initialState?: InitialState): ActionReducer; } type MetaReducer = (reducer: ActionReducer) => ActionReducer; interface StoreFeature { key: string; reducers: ActionReducerMap | ActionReducer; reducerFactory: ActionReducerFactory; initialState?: InitialState; metaReducers?: MetaReducer[]; } type Selector = (state: T) => V; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ type SelectorWithProps = (state: State, props: Props) => Result; declare const arraysAreNotAllowedMsg = "action creator cannot return an array"; type ArraysAreNotAllowed = typeof arraysAreNotAllowedMsg; declare const typePropertyIsNotAllowedMsg = "action creator cannot return an object with a property named `type`"; type TypePropertyIsNotAllowed = typeof typePropertyIsNotAllowedMsg; declare const emptyObjectsAreNotAllowedMsg = "action creator cannot return an empty object"; type EmptyObjectsAreNotAllowed = typeof emptyObjectsAreNotAllowedMsg; declare const arraysAreNotAllowedInProps = "action creator props cannot be an array"; type ArraysAreNotAllowedInProps = typeof arraysAreNotAllowedInProps; declare const typePropertyIsNotAllowedInProps = "action creator props cannot have a property named `type`"; type TypePropertyIsNotAllowedInProps = typeof typePropertyIsNotAllowedInProps; declare const emptyObjectsAreNotAllowedInProps = "action creator props cannot be an empty object"; type EmptyObjectsAreNotAllowedInProps = typeof emptyObjectsAreNotAllowedInProps; declare const primitivesAreNotAllowedInProps = "action creator props cannot be a primitive value"; type PrimitivesAreNotAllowedInProps = typeof primitivesAreNotAllowedInProps; type CreatorsNotAllowedCheck = T extends ActionCreator ? 'Action creator is not allowed to be dispatched. Did you forget to call it?' : unknown; /** * A function that returns an object in the shape of the `Action` interface. Configured using `createAction`. */ type Creator

= FunctionWithParametersType; type Primitive = string | number | bigint | boolean | symbol | null | undefined; type NotAllowedCheck = T extends any[] ? ArraysAreNotAllowed : T extends { type: any; } ? TypePropertyIsNotAllowed : keyof T extends never ? EmptyObjectsAreNotAllowed : unknown; type NotAllowedInPropsCheck = T extends object ? T extends any[] ? ArraysAreNotAllowedInProps : T extends { type: any; } ? TypePropertyIsNotAllowedInProps : keyof T extends never ? EmptyObjectsAreNotAllowedInProps : unknown : T extends Primitive ? PrimitivesAreNotAllowedInProps : never; /** * See `Creator`. */ type ActionCreator = C & Action; interface ActionCreatorProps { _as: 'props'; _p: T; } type FunctionWithParametersType

= (...args: P) => R; interface RuntimeChecks { /** * Verifies if the state is serializable */ strictStateSerializability: boolean; /** * Verifies if the actions are serializable. Please note, you may not need to set it to `true` unless you are storing/replaying actions using external resources, for example `localStorage`. */ strictActionSerializability: boolean; /** * Verifies that the state isn't mutated */ strictStateImmutability: boolean; /** * Verifies that actions aren't mutated */ strictActionImmutability: boolean; /** * Verifies that actions are dispatched within NgZone */ strictActionWithinNgZone: boolean; /** * Verifies that action types are not registered more than once */ strictActionTypeUniqueness?: boolean; } interface SelectSignalOptions { /** * A comparison function which defines equality for select results. */ equal?: ValueEqualityFn; } type Prettify = { [K in keyof T]: T[K]; } & {}; /** * @description * Creates a configured `Creator` function that, when called, returns an object in the shape of the * `Action` interface with no additional metadata. * * @param type Describes the action that will be dispatched * * @usageNotes * * Declaring an action creator: * * ```ts * export const increment = createAction('[Counter] Increment'); * ``` * * Dispatching an action: * * ```ts * store.dispatch(increment()); * ``` * * Referencing the action in a reducer: * * ```ts * on(CounterActions.increment, (state) => ({ ...state, count: state.count + 1 })) * ``` * * Referencing the action in an effect: * ```ts * effectName$ = createEffect( * () => this.actions$.pipe( * ofType(CounterActions.increment), * // ... * ) * ); * ``` */ declare function createAction(type: T): ActionCreator Action>; /** * @description * Creates a configured `Creator` function that, when called, returns an object in the shape of the * `Action` interface with metadata provided by the `props` or `emptyProps` functions. * * @param type Describes the action that will be dispatched * * @usageNotes * * Declaring an action creator: * * ```ts * export const loginSuccess = createAction( * '[Auth/API] Login Success', * props<{ user: User }>() * ); * ``` * * Dispatching an action: * * ```ts * store.dispatch(loginSuccess({ user: newUser })); * ``` * * Referencing the action in a reducer: * * ```ts * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user })) * ``` * * Referencing the action in an effect: * ```ts * effectName$ = createEffect( * () => this.actions$.pipe( * ofType(AuthApiActions.loginSuccess), * // ... * ) * ); * ``` */ declare function createAction(type: T, config: ActionCreatorProps

& NotAllowedCheck

): ActionCreator) => P & Action>; declare function createAction(type: T, creator: Creator>): FunctionWithParametersType> & Action; declare function props

>(): ActionCreatorProps

; declare function union; }>(creators: C): ReturnType; type Join = Str extends `${infer First}${Separator}${infer Rest}` ? Join<`${First}${Rest}`, Separator> : Str; type CapitalizeWords = Str extends `${infer First} ${infer Rest}` ? `${Capitalize} ${CapitalizeWords}` : Capitalize; type StringLiteralCheck = string extends Str ? `${Name} must be a string literal type` : unknown; type UniqueEventNameCheck = ActionName extends ActionName> ? `${ActionName} action is already defined` : unknown; type NotAllowedEventPropsCheck | Creator> = PropsCreator extends ActionCreatorProps ? Props extends void ? unknown : NotAllowedCheck : PropsCreator extends Creator ? NotAllowedCheck : unknown; type EventCreator | Creator, Type extends string> = PropsCreator extends ActionCreatorProps ? void extends Props ? ActionCreator Action> : ActionCreator) => Props & Action> : PropsCreator extends Creator ? FunctionWithParametersType & Action> & Action : never; type ActionName = Uncapitalize>>; interface ActionGroupConfig | Creator>> { source: Source & StringLiteralCheck; events: Events & { [EventName in keyof Events]: StringLiteralCheck & UniqueEventNameCheck & NotAllowedEventPropsCheck; }; } type ActionGroup | Creator>> = { [EventName in keyof Events as ActionName]: EventCreator; }; /** * @description * A function that creates a group of action creators with the same source. * * @param config An object that contains a source and dictionary of events. * An event is a key-value pair of an event name and event props. * @returns A dictionary of action creators. * The name of each action creator is created by camel casing the event name. * The type of each action is created using the "[Source] Event Name" pattern. * * @usageNotes * * ```ts * const authApiActions = createActionGroup({ * source: 'Auth API', * events: { * // defining events with payload using the `props` function * 'Login Success': props<{ userId: number; token: string }>(), * 'Login Failure': props<{ error: string }>(), * * // defining an event without payload using the `emptyProps` function * 'Logout Success': emptyProps(), * * // defining an event with payload using the props factory * 'Logout Failure': (error: Error) => ({ error }), * }, * }); * * // action type: "[Auth API] Login Success" * authApiActions.loginSuccess({ userId: 10, token: 'ngrx' }); * * // action type: "[Auth API] Login Failure" * authApiActions.loginFailure({ error: 'Login Failure!' }); * * // action type: "[Auth API] Logout Success" * authApiActions.logoutSuccess(); * * // action type: "[Auth API] Logout Failure"; * authApiActions.logoutFailure(new Error('Logout Failure!')); * ``` */ declare function createActionGroup | Creator>>(config: ActionGroupConfig): ActionGroup; declare function emptyProps(): ActionCreatorProps; declare const INIT: "@ngrx/store/init"; declare class ActionsSubject extends BehaviorSubject implements OnDestroy { constructor(); next(action: Action): void; complete(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare abstract class ReducerObservable extends Observable> { } declare abstract class ReducerManagerDispatcher extends ActionsSubject { } declare const UPDATE: "@ngrx/store/update-reducers"; declare class ReducerManager extends BehaviorSubject> implements OnDestroy { private dispatcher; private initialState; private reducers; private reducerFactory; get currentReducers(): ActionReducerMap; constructor(dispatcher: ReducerManagerDispatcher, initialState: any, reducers: ActionReducerMap, reducerFactory: ActionReducerFactory); addFeature(feature: StoreFeature): void; addFeatures(features: StoreFeature[]): void; removeFeature(feature: StoreFeature): void; removeFeatures(features: StoreFeature[]): void; addReducer(key: string, reducer: ActionReducer): void; addReducers(reducers: { [key: string]: ActionReducer; }): void; removeReducer(featureKey: string): void; removeReducers(featureKeys: string[]): void; private updateReducers; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ScannedActionsSubject extends Subject implements OnDestroy { ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare abstract class StateObservable extends Observable { } declare class State$1 extends BehaviorSubject implements OnDestroy { static readonly INIT: "@ngrx/store/init"; private stateSubscription; constructor(actions$: ActionsSubject, reducer$: ReducerObservable, scannedActions: ScannedActionsSubject, initialState: any); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } type StateActionPair = { state: T | undefined; action?: V; }; declare function reduceState(stateActionPair: StateActionPair | undefined, [action, reducer]: [V, ActionReducer]): StateActionPair; declare class Store extends Observable implements Observer { private actionsObserver; private reducerManager; private injector?; constructor(state$: StateObservable, actionsObserver: ActionsSubject, reducerManager: ReducerManager, injector?: Injector | undefined); select(mapFn: (state: T) => K): Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ select(mapFn: (state: T, props: Props) => K, props: Props): Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ select(key: a): Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ select(key1: a, key2: b): Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ select(key1: a, key2: b, key3: c): Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ select(key1: a, key2: b, key3: c, key4: d): Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ select(key1: a, key2: b, key3: c, key4: d, key5: e): Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ select(key1: a, key2: b, key3: c, key4: d, key5: e, key6: f): Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ select(key1: a, key2: b, key3: c, key4: d, key5: e, key6: f, ...paths: string[]): Observable; /** * Returns a signal of the provided selector. * * @param selector selector function * @param options select signal options * @returns Signal of the state selected by the provided selector * @usageNotes * * ```ts * const count = this.store.selectSignal(state => state.count); * ``` * * Or with a selector created by @ngrx/store!createSelector:function * * ```ts * const selectCount = createSelector( * (state: State) => state.count, * ); * * const count = this.store.selectSignal(selectCount); * ``` */ selectSignal(selector: (state: T) => K, options?: SelectSignalOptions): Signal; lift(operator: Operator): Store; dispatch(action: V & CreatorsNotAllowedCheck): void; dispatch Action>(dispatchFn: V & CreatorsNotAllowedCheck, config?: { injector: Injector; }): EffectRef; next(action: Action): void; error(err: any): void; complete(): void; addReducer(key: string, reducer: ActionReducer): void; removeReducer>(key: Key): void; private processDispatchFn; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare function select(mapFn: (state: T) => K): (source$: Observable) => Observable; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function select(mapFn: (state: T, props: Props) => K, props: Props): (source$: Observable) => Observable; declare function select(key: a): (source$: Observable) => Observable; declare function select(key1: a, key2: b): (source$: Observable) => Observable; declare function select(key1: a, key2: b, key3: c): (source$: Observable) => Observable; declare function select(key1: a, key2: b, key3: c, key4: d): (source$: Observable) => Observable; declare function select(key1: a, key2: b, key3: c, key4: d, key5: e): (source$: Observable) => Observable; declare function select(key1: a, key2: b, key3: c, key4: d, key5: e, key6: f): (source$: Observable) => Observable; declare function select(key1: a, key2: b, key3: c, key4: d, key5: e, key6: f, ...paths: string[]): (source$: Observable) => Observable; declare function combineReducers(reducers: ActionReducerMap, initialState?: Partial): ActionReducer; declare function compose(): (i: A) => A; declare function compose(b: (i: A) => B): (i: A) => B; declare function compose(c: (i: B) => C, b: (i: A) => B): (i: A) => C; declare function compose(d: (i: C) => D, c: (i: B) => C, b: (i: A) => B): (i: A) => D; declare function compose(e: (i: D) => E, d: (i: C) => D, c: (i: B) => C, b: (i: A) => B): (i: A) => E; declare function compose(f: (i: E) => F, e: (i: D) => E, d: (i: C) => D, c: (i: B) => C, b: (i: A) => B): (i: A) => F; declare function compose(...functions: any[]): (i: A) => F; declare function createReducerFactory(reducerFactory: ActionReducerFactory, metaReducers?: MetaReducer[]): ActionReducerFactory; type AnyFn = (...args: any[]) => any; type MemoizedProjection = { memoized: AnyFn; reset: () => void; setResult: (result?: any) => void; clearResult: () => void; }; type MemoizeFn = (t: AnyFn) => MemoizedProjection; type ComparatorFn = (a: any, b: any) => boolean; type DefaultProjectorFn = (...args: any[]) => T; interface MemoizedSelector> extends Selector { release(): void; projector: ProjectorFn; setResult: (result?: Result) => void; clearResult: () => void; } /** * @deprecated Selectors with props are deprecated, for more info see the {@link https://ngrx.io/guide/migration/v12#ngrxstore migration guide} */ interface MemoizedSelectorWithProps> extends SelectorWithProps { release(): void; projector: ProjectorFn; setResult: (result?: Result) => void; clearResult: () => void; } declare function isEqualCheck(a: any, b: any): boolean; declare function resultMemoize(projectionFn: AnyFn, isResultEqual: ComparatorFn): MemoizedProjection; declare function defaultMemoize(projectionFn: AnyFn, isArgumentsEqual?: typeof isEqualCheck, isResultEqual?: typeof isEqualCheck): MemoizedProjection; declare function createSelector(s1: Selector, projector: (s1: S1) => Result): MemoizedSelector; declare function createSelector(s1: Selector, s2: Selector, projector: (s1: S1, s2: S2) => Result): MemoizedSelector; declare function createSelector(s1: Selector, s2: Selector, s3: Selector, projector: (s1: S1, s2: S2, s3: S3) => Result): MemoizedSelector; declare function createSelector(s1: Selector, s2: Selector, s3: Selector, s4: Selector, projector: (s1: S1, s2: S2, s3: S3, s4: S4) => Result): MemoizedSelector; declare function createSelector(s1: Selector, s2: Selector, s3: Selector, s4: Selector, s5: Selector, projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5) => Result): MemoizedSelector; declare function createSelector(s1: Selector, s2: Selector, s3: Selector, s4: Selector, s5: Selector, s6: Selector, projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6) => Result): MemoizedSelector; declare function createSelector(s1: Selector, s2: Selector, s3: Selector, s4: Selector, s5: Selector, s6: Selector, s7: Selector, projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, s7: S7) => Result): MemoizedSelector; declare function createSelector(s1: Selector, s2: Selector, s3: Selector, s4: Selector, s5: Selector, s6: Selector, s7: Selector, s8: Selector, projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, s7: S7, s8: S8) => Result): MemoizedSelector; declare function createSelector>, State = Selectors extends Record> ? S : never, Result extends Record = { [Key in keyof Selectors]: Selectors[Key] extends Selector ? R : never; }>(selectors: Selectors): MemoizedSelector; declare function createSelector(...args: [...slices: Selector[], projector: unknown] & [ ...slices: { [i in keyof Slices]: Selector; }, projector: (...s: Slices) => Result ]): MemoizedSelector Result>; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(s1: SelectorWithProps, projector: (s1: S1, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(s1: SelectorWithProps, s2: SelectorWithProps, projector: (s1: S1, s2: S2, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(s1: SelectorWithProps, s2: SelectorWithProps, s3: SelectorWithProps, projector: (s1: S1, s2: S2, s3: S3, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(s1: SelectorWithProps, s2: SelectorWithProps, s3: SelectorWithProps, s4: SelectorWithProps, projector: (s1: S1, s2: S2, s3: S3, s4: S4, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(s1: SelectorWithProps, s2: SelectorWithProps, s3: SelectorWithProps, s4: SelectorWithProps, s5: SelectorWithProps, projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(s1: SelectorWithProps, s2: SelectorWithProps, s3: SelectorWithProps, s4: SelectorWithProps, s5: SelectorWithProps, s6: SelectorWithProps, projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(s1: SelectorWithProps, s2: SelectorWithProps, s3: SelectorWithProps, s4: SelectorWithProps, s5: SelectorWithProps, s6: SelectorWithProps, s7: SelectorWithProps, projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, s7: S7, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(s1: SelectorWithProps, s2: SelectorWithProps, s3: SelectorWithProps, s4: SelectorWithProps, s5: SelectorWithProps, s6: SelectorWithProps, s7: SelectorWithProps, s8: SelectorWithProps, projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, s7: S7, s8: S8, props: Props) => Result): MemoizedSelectorWithProps; declare function createSelector(selectors: Selector[] & [ ...{ [i in keyof Slices]: Selector; } ], projector: (...s: Slices) => Result): MemoizedSelector Result>; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(selectors: [SelectorWithProps], projector: (s1: S1, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(selectors: [ SelectorWithProps, SelectorWithProps ], projector: (s1: S1, s2: S2, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(selectors: [ SelectorWithProps, SelectorWithProps, SelectorWithProps ], projector: (s1: S1, s2: S2, s3: S3, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(selectors: [ SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps ], projector: (s1: S1, s2: S2, s3: S3, s4: S4, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(selectors: [ SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps ], projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(selectors: [ SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps ], projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(selectors: [ SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps ], projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, s7: S7, props: Props) => Result): MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelector(selectors: [ SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps, SelectorWithProps ], projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, s7: S7, s8: S8, props: Props) => Result): MemoizedSelectorWithProps; declare function defaultStateFn(state: any, selectors: Selector[] | SelectorWithProps[], props: any, memoizedProjector: MemoizedProjection): any; type SelectorFactoryConfig = { stateFn: (state: T, selectors: Selector[], props: any, memoizedProjector: MemoizedProjection) => V; }; declare function createSelectorFactory(memoize: MemoizeFn): (...input: any[]) => MemoizedSelector; declare function createSelectorFactory(memoize: MemoizeFn, options: SelectorFactoryConfig): (...input: any[]) => MemoizedSelector; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelectorFactory(memoize: MemoizeFn): (...input: any[]) => MemoizedSelectorWithProps; /** * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue} */ declare function createSelectorFactory(memoize: MemoizeFn, options: SelectorFactoryConfig): (...input: any[]) => MemoizedSelectorWithProps; declare function createFeatureSelector(featureName: string): MemoizedSelector; /** * @deprecated Feature selectors with a root state are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/3179 Github Issue} */ declare function createFeatureSelector(featureName: keyof T): MemoizedSelector; interface FeatureConfig { name: FeatureName; reducer: ActionReducer; } type Feature = FeatureConfig & BaseSelectors; type FeatureWithExtraSelectors = string extends keyof ExtraSelectors ? Feature : Omit, keyof ExtraSelectors> & ExtraSelectors; type FeatureSelector = { [K in FeatureName as `select${Capitalize}State`]: MemoizedSelector, FeatureState, (featureState: FeatureState) => FeatureState>; }; type NestedSelectors = FeatureState extends Primitive | unknown[] | Date ? {} : { [K in keyof FeatureState & string as `select${Capitalize}`]: MemoizedSelector, FeatureState[K], (featureState: FeatureState) => FeatureState[K]>; }; type BaseSelectors = FeatureSelector & NestedSelectors; type SelectorsDictionary = Record, unknown> | ((...args: any[]) => Selector, unknown>)>; type ExtraSelectorsFactory = (baseSelectors: BaseSelectors) => ExtraSelectors; type NotAllowedFeatureStateCheck = FeatureState extends Required ? unknown : 'optional properties are not allowed in the feature state'; /** * Creates a feature object with extra selectors. * * @param featureConfig An object that contains a feature name, a feature * reducer, and extra selectors factory. * @returns An object that contains a feature name, a feature reducer, * a feature selector, a selector for each feature state property, and * extra selectors. */ declare function createFeature(featureConfig: FeatureConfig & { extraSelectors: ExtraSelectorsFactory; } & NotAllowedFeatureStateCheck): Prettify>; /** * Creates a feature object. * * @param featureConfig An object that contains a feature name and a feature * reducer. * @returns An object that contains a feature name, a feature reducer, * a feature selector, and a selector for each feature state property. */ declare function createFeature(featureConfig: FeatureConfig & NotAllowedFeatureStateCheck): Prettify>; declare function setNgrxMockEnvironment(value: boolean): void; declare function isNgrxMockEnvironment(): boolean; declare const INITIAL_STATE: InjectionToken; declare const REDUCER_FACTORY: InjectionToken; declare const INITIAL_REDUCERS: InjectionToken; declare const STORE_FEATURES: InjectionToken; declare const FEATURE_REDUCERS: InjectionToken; /** * User-defined meta reducers from StoreModule.forRoot() */ declare const USER_PROVIDED_META_REDUCERS: InjectionToken; /** * Meta reducers defined either internally by @ngrx/store or by library authors */ declare const META_REDUCERS: InjectionToken; /** * Runtime checks defined by the user via an InjectionToken * Defaults to `_USER_RUNTIME_CHECKS` */ declare const USER_RUNTIME_CHECKS: InjectionToken; /** * Runtime checks currently in use */ declare const ACTIVE_RUNTIME_CHECKS: InjectionToken; /** * InjectionToken that registers the global Store. * Mainly used to provide a hook that can be injected * to ensure the root state is loaded before something * that depends on it. */ declare const ROOT_STORE_PROVIDER: InjectionToken; /** * InjectionToken that registers feature states. * Mainly used to provide a hook that can be injected * to ensure feature state is loaded before something * that depends on it. */ declare const FEATURE_STATE_PROVIDER: InjectionToken; interface StoreConfig { initialState?: InitialState; reducerFactory?: ActionReducerFactory; metaReducers?: MetaReducer<{ [P in keyof T]: T[P]; }, V>[]; } interface RootStoreConfig extends StoreConfig { runtimeChecks?: Partial; } /** * An object with the name and the reducer for the feature. */ interface FeatureSlice { name: string; reducer: ActionReducer; } declare class StoreRootModule { constructor(actions$: ActionsSubject, reducer$: ReducerObservable, scannedActions$: ScannedActionsSubject, store: Store, guard: any, actionCheck: any); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class StoreFeatureModule implements OnDestroy { private features; private featureReducers; private reducerManager; constructor(features: StoreFeature[], featureReducers: ActionReducerMap[], reducerManager: ReducerManager, root: StoreRootModule, actionCheck: any); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class StoreModule { static forRoot(reducers?: ActionReducerMap | InjectionToken>, config?: RootStoreConfig): ModuleWithProviders; static forFeature(featureName: string, reducers: ActionReducerMap | InjectionToken>, config?: StoreConfig | InjectionToken>): ModuleWithProviders; static forFeature(featureName: string, reducer: ActionReducer | InjectionToken>, config?: StoreConfig | InjectionToken>): ModuleWithProviders; static forFeature(slice: FeatureSlice): ModuleWithProviders; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare function provideState(featureName: string, reducers: ActionReducerMap | InjectionToken>, config?: StoreConfig | InjectionToken>): EnvironmentProviders; declare function provideState(featureName: string, reducer: ActionReducer | InjectionToken>, config?: StoreConfig | InjectionToken>): EnvironmentProviders; declare function provideState(slice: FeatureSlice): EnvironmentProviders; /** * Provides the global Store providers and initializes * the Store. * These providers cannot be used at the component level. * * @usageNotes * * ### Providing the Global Store * * ```ts * bootstrapApplication(AppComponent, { * providers: [provideStore()], * }); * ``` */ declare function provideStore(reducers?: ActionReducerMap | InjectionToken>, config?: RootStoreConfig): EnvironmentProviders; type ExtractActionTypes = { [Key in keyof Creators]: Creators[Key] extends ActionCreator ? T : never; }; /** * Return type of the `on` fn. * Contains the action reducer coupled to one or more action types. */ interface ReducerTypes { reducer: OnReducer; types: ExtractActionTypes; } /** * Specialized Reducer that is aware of the Action type it needs to handle */ interface OnReducer { (state: unknown extends State ? InferredState : State, action: ActionType): ResultState; } /** * @description * Associates actions with a given state change function. * A state change function must be provided as the last parameter. * * @param args `ActionCreator`'s followed by a state change function. * * @returns an association of action types with a state change function. * * @usageNotes * ```ts * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user })) * ``` */ declare function on(...args: [ ...creators: Creators, reducer: OnReducer ]): ReducerTypes; /** * @description * Creates a reducer function to handle state transitions. * * Reducer creators reduce the explicitness of reducer functions with switch statements. * * @param initialState Provides a state value if the current state is `undefined`, as it is initially. * @param ons Associations between actions and state changes. * @returns A reducer function. * * @usageNotes * * - Must be used with `ActionCreator`'s (returned by `createAction`). Cannot be used with class-based action creators. * - The returned `ActionReducer` does not require being wrapped with another function. * * **Declaring a reducer creator** * * ```ts * export const reducer = createReducer( * initialState, * on( * featureActions.actionOne, * featureActions.actionTwo, * (state, { updatedValue }) => ({ ...state, prop: updatedValue }) * ), * on(featureActions.actionThree, () => initialState); * ); * ``` */ declare function createReducer = ActionReducer>(initialState: S, ...ons: ReducerTypes[]): R; export { ACTIVE_RUNTIME_CHECKS, ActionsSubject, FEATURE_REDUCERS, FEATURE_STATE_PROVIDER, INIT, INITIAL_REDUCERS, INITIAL_STATE, META_REDUCERS, REDUCER_FACTORY, ROOT_STORE_PROVIDER, ReducerManager, ReducerManagerDispatcher, ReducerObservable, STORE_FEATURES, ScannedActionsSubject, State$1 as State, StateObservable, Store, StoreFeatureModule, StoreModule, StoreRootModule, UPDATE, USER_PROVIDED_META_REDUCERS, USER_RUNTIME_CHECKS, combineReducers, compose, createAction, createActionGroup, createFeature, createFeatureSelector, createReducer, createReducerFactory, createSelector, createSelectorFactory, defaultMemoize, defaultStateFn, emptyProps, isNgrxMockEnvironment, on, props, provideState, provideStore, reduceState, resultMemoize, select, setNgrxMockEnvironment, union }; export type { Action, ActionCreator, ActionCreatorProps, ActionReducer, ActionReducerFactory, ActionReducerMap, ActionType, Creator, DefaultProjectorFn, FeatureConfig, FeatureSlice, FunctionWithParametersType, MemoizeFn, MemoizedProjection, MemoizedSelector, MemoizedSelectorWithProps, MetaReducer, NotAllowedCheck, ReducerTypes, RootStoreConfig, RuntimeChecks, SelectSignalOptions, Selector, SelectorWithProps, StoreConfig };