@ngrx/store
Version:
RxJS powered Redux for Angular apps
1 lines • 134 kB
Source Map (JSON)
{"version":3,"file":"ngrx-store.mjs","sources":["../../../../modules/store/src/globals.ts","../../../../modules/store/src/action_creator.ts","../../../../modules/store/src/helpers.ts","../../../../modules/store/src/action_group_creator.ts","../../../../modules/store/src/actions_subject.ts","../../../../modules/store/src/tokens.ts","../../../../modules/store/src/utils.ts","../../../../modules/store/src/reducer_manager.ts","../../../../modules/store/src/scanned_actions_subject.ts","../../../../modules/store/src/state.ts","../../../../modules/store/src/store.ts","../../../../modules/store/src/meta-reducers/utils.ts","../../../../modules/store/src/flags.ts","../../../../modules/store/src/selector.ts","../../../../modules/store/src/feature_creator.ts","../../../../modules/store/src/store_config.ts","../../../../modules/store/src/meta-reducers/immutability_reducer.ts","../../../../modules/store/src/meta-reducers/serialization_reducer.ts","../../../../modules/store/src/meta-reducers/inNgZoneAssert_reducer.ts","../../../../modules/store/src/runtime_checks.ts","../../../../modules/store/src/provide_store.ts","../../../../modules/store/src/store_module.ts","../../../../modules/store/src/reducer_creator.ts","../../../../modules/store/index.ts","../../../../modules/store/ngrx-store.ts"],"sourcesContent":["export const REGISTERED_ACTION_TYPES: { [actionType: string]: number } = {};\n\nexport function resetRegisteredActionTypes() {\n for (const key of Object.keys(REGISTERED_ACTION_TYPES)) {\n delete REGISTERED_ACTION_TYPES[key];\n }\n}\n","import {\n Creator,\n ActionCreator,\n Action,\n FunctionWithParametersType,\n NotAllowedCheck,\n ActionCreatorProps,\n NotAllowedInPropsCheck,\n} from './models';\nimport { REGISTERED_ACTION_TYPES } from './globals';\n\n// Action creators taken from ts-action library and modified a bit to better\n// fit current NgRx usage. Thank you Nicholas Jamieson (@cartant).\n\nexport function createAction<T extends string>(\n type: T\n): ActionCreator<T, () => Action<T>>;\nexport function createAction<T extends string, P extends object>(\n type: T,\n config: ActionCreatorProps<P> & NotAllowedCheck<P>\n): ActionCreator<T, (props: P & NotAllowedCheck<P>) => P & Action<T>>;\nexport function createAction<\n T extends string,\n P extends any[],\n R extends object\n>(\n type: T,\n creator: Creator<P, R & NotAllowedCheck<R>>\n): FunctionWithParametersType<P, R & Action<T>> & Action<T>;\n/**\n * @description\n * Creates a configured `Creator` function that, when called, returns an object in the shape of the `Action` interface.\n *\n * Action creators reduce the explicitness of class-based action creators.\n *\n * @param type Describes the action that will be dispatched\n * @param config Additional metadata needed for the handling of the action. See {@link createAction#usage-notes Usage Notes}.\n *\n * @usageNotes\n *\n * **Declaring an action creator**\n *\n * Without additional metadata:\n * ```ts\n * export const increment = createAction('[Counter] Increment');\n * ```\n * With additional metadata:\n * ```ts\n * export const loginSuccess = createAction(\n * '[Auth/API] Login Success',\n * props<{ user: User }>()\n * );\n * ```\n * With a function:\n * ```ts\n * export const loginSuccess = createAction(\n * '[Auth/API] Login Success',\n * (response: Response) => response.user\n * );\n * ```\n *\n * **Dispatching an action**\n *\n * Without additional metadata:\n * ```ts\n * store.dispatch(increment());\n * ```\n * With additional metadata:\n * ```ts\n * store.dispatch(loginSuccess({ user: newUser }));\n * ```\n *\n * **Referencing an action in a reducer**\n *\n * Using a switch statement:\n * ```ts\n * switch (action.type) {\n * // ...\n * case AuthApiActions.loginSuccess.type: {\n * return {\n * ...state,\n * user: action.user\n * };\n * }\n * }\n * ```\n * Using a reducer creator:\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n *\n * **Referencing an action in an effect**\n * ```ts\n * effectName$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(AuthApiActions.loginSuccess),\n * // ...\n * )\n * );\n * ```\n */\nexport function createAction<T extends string, C extends Creator>(\n type: T,\n config?: { _as: 'props' } | C\n): ActionCreator<T> {\n REGISTERED_ACTION_TYPES[type] = (REGISTERED_ACTION_TYPES[type] || 0) + 1;\n\n if (typeof config === 'function') {\n return defineType(type, (...args: any[]) => ({\n ...config(...args),\n type,\n }));\n }\n const as = config ? config._as : 'empty';\n switch (as) {\n case 'empty':\n return defineType(type, () => ({ type }));\n case 'props':\n return defineType(type, (props: object) => ({\n ...props,\n type,\n }));\n default:\n throw new Error('Unexpected config.');\n }\n}\n\nexport function props<\n P extends SafeProps,\n SafeProps = NotAllowedInPropsCheck<P>\n>(): ActionCreatorProps<P> {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return { _as: 'props', _p: undefined! };\n}\n\nexport function union<\n C extends { [key: string]: ActionCreator<string, Creator> }\n>(creators: C): ReturnType<C[keyof C]> {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return undefined!;\n}\n\nfunction defineType<T extends string>(\n type: T,\n creator: Creator\n): ActionCreator<T> {\n return Object.defineProperty(creator, 'type', {\n value: type,\n writable: false,\n }) as ActionCreator<T>;\n}\n","export function capitalize<T extends string>(text: T): Capitalize<T> {\n return (text.charAt(0).toUpperCase() + text.substring(1)) as Capitalize<T>;\n}\n\nexport function uncapitalize<T extends string>(text: T): Uncapitalize<T> {\n return (text.charAt(0).toLowerCase() + text.substring(1)) as Uncapitalize<T>;\n}\n\nexport function assertDefined<T>(\n value: T | null | undefined,\n name: string\n): asserts value is T {\n if (value === null || value === undefined) {\n throw new Error(`${name} must be defined.`);\n }\n}\n","import { createAction, props } from './action_creator';\nimport {\n ActionCreator,\n ActionCreatorProps,\n Creator,\n FunctionWithParametersType,\n NotAllowedCheck,\n Action,\n} from './models';\nimport { capitalize, uncapitalize } from './helpers';\n\ntype Join<\n Str extends string,\n Separator extends string = ' '\n> = Str extends `${infer First}${Separator}${infer Rest}`\n ? Join<`${First}${Rest}`, Separator>\n : Str;\n\ntype CapitalizeWords<Str extends string> =\n Str extends `${infer First} ${infer Rest}`\n ? `${Capitalize<First>} ${CapitalizeWords<Rest>}`\n : Capitalize<Str>;\n\ntype StringLiteralCheck<\n Str extends string,\n Name extends string\n> = string extends Str ? `${Name} must be a string literal type` : unknown;\n\ntype UniqueEventNameCheck<\n EventNames extends string,\n EventName extends string\n> = ActionName<EventName> extends ActionName<Exclude<EventNames, EventName>>\n ? `${ActionName<EventName>} action is already defined`\n : unknown;\n\ntype NotAllowedEventPropsCheck<\n PropsCreator extends ActionCreatorProps<unknown> | Creator\n> = PropsCreator extends ActionCreatorProps<infer Props>\n ? Props extends void\n ? unknown\n : NotAllowedCheck<Props & object>\n : PropsCreator extends Creator<any, infer Result>\n ? NotAllowedCheck<Result>\n : unknown;\n\ntype EventCreator<\n PropsCreator extends ActionCreatorProps<unknown> | Creator,\n Type extends string\n> = PropsCreator extends ActionCreatorProps<infer Props>\n ? void extends Props\n ? ActionCreator<Type, () => Action<Type>>\n : ActionCreator<\n Type,\n (props: Props & NotAllowedCheck<Props & object>) => Props & Action<Type>\n >\n : PropsCreator extends Creator<infer Props, infer Result>\n ? FunctionWithParametersType<\n Props,\n Result & NotAllowedCheck<Result> & Action<Type>\n > &\n Action<Type>\n : never;\n\ntype ActionName<EventName extends string> = Uncapitalize<\n Join<CapitalizeWords<EventName>>\n>;\n\ninterface ActionGroupConfig<\n Source extends string,\n Events extends Record<string, ActionCreatorProps<unknown> | Creator>\n> {\n source: Source & StringLiteralCheck<Source, 'source'>;\n events: Events & {\n [EventName in keyof Events]: StringLiteralCheck<\n EventName & string,\n 'event name'\n > &\n UniqueEventNameCheck<keyof Events & string, EventName & string> &\n NotAllowedEventPropsCheck<Events[EventName]>;\n };\n}\n\ntype ActionGroup<\n Source extends string,\n Events extends Record<string, ActionCreatorProps<unknown> | Creator>\n> = {\n [EventName in keyof Events as ActionName<EventName & string>]: EventCreator<\n Events[EventName],\n `[${Source}] ${EventName & string}`\n >;\n};\n\n/**\n * @description\n * A function that creates a group of action creators with the same source.\n *\n * @param config An object that contains a source and dictionary of events.\n * An event is a key-value pair of an event name and event props.\n * @returns A dictionary of action creators.\n * The name of each action creator is created by camel casing the event name.\n * The type of each action is created using the \"[Source] Event Name\" pattern.\n *\n * @usageNotes\n *\n * ```ts\n * const authApiActions = createActionGroup({\n * source: 'Auth API',\n * events: {\n * // defining events with payload using the `props` function\n * 'Login Success': props<{ userId: number; token: string }>(),\n * 'Login Failure': props<{ error: string }>(),\n *\n * // defining an event without payload using the `emptyProps` function\n * 'Logout Success': emptyProps(),\n *\n * // defining an event with payload using the props factory\n * 'Logout Failure': (error: Error) => ({ error }),\n * },\n * });\n *\n * // action type: \"[Auth API] Login Success\"\n * authApiActions.loginSuccess({ userId: 10, token: 'ngrx' });\n *\n * // action type: \"[Auth API] Login Failure\"\n * authApiActions.loginFailure({ error: 'Login Failure!' });\n *\n * // action type: \"[Auth API] Logout Success\"\n * authApiActions.logoutSuccess();\n *\n * // action type: \"[Auth API] Logout Failure\";\n * authApiActions.logoutFailure(new Error('Logout Failure!'));\n * ```\n */\nexport function createActionGroup<\n Source extends string,\n Events extends Record<string, ActionCreatorProps<unknown> | Creator>\n>(config: ActionGroupConfig<Source, Events>): ActionGroup<Source, Events> {\n const { source, events } = config;\n\n return Object.keys(events).reduce(\n (actionGroup, eventName) => ({\n ...actionGroup,\n [toActionName(eventName)]: createAction(\n toActionType(source, eventName),\n (events as any)[eventName]\n ),\n }),\n {} as ActionGroup<Source, Events>\n );\n}\n\nexport function emptyProps(): ActionCreatorProps<void> {\n return props();\n}\n\nfunction toActionName<EventName extends string>(\n eventName: EventName\n): ActionName<EventName> {\n return eventName\n .trim()\n .split(' ')\n .map((word, i) => (i === 0 ? uncapitalize(word) : capitalize(word)))\n .join('') as ActionName<EventName>;\n}\n\nfunction toActionType<Source extends string, EventName extends string>(\n source: Source,\n eventName: EventName\n): `[${Source}] ${EventName}` {\n return `[${source}] ${eventName}`;\n}\n","import { Injectable, OnDestroy, Provider } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { Action } from './models';\n\nexport const INIT = '@ngrx/store/init' as const;\n\n@Injectable()\nexport class ActionsSubject\n extends BehaviorSubject<Action>\n implements OnDestroy\n{\n constructor() {\n super({ type: INIT });\n }\n\n override next(action: Action): void {\n if (typeof action === 'function') {\n throw new TypeError(`\n Dispatch expected an object, instead it received a function.\n If you're using the createAction function, make sure to invoke the function\n before dispatching the action. For example, someAction should be someAction().`);\n } else if (typeof action === 'undefined') {\n throw new TypeError(`Actions must be objects`);\n } else if (typeof action.type === 'undefined') {\n throw new TypeError(`Actions must have a type property`);\n }\n super.next(action);\n }\n\n override complete() {\n /* noop */\n }\n\n ngOnDestroy() {\n super.complete();\n }\n}\n\nexport const ACTIONS_SUBJECT_PROVIDERS: Provider[] = [ActionsSubject];\n","import { InjectionToken } from '@angular/core';\nimport { RuntimeChecks, MetaReducer } from './models';\n\nexport const _ROOT_STORE_GUARD = new InjectionToken<void>(\n '@ngrx/store Internal Root Guard'\n);\nexport const _INITIAL_STATE = new InjectionToken(\n '@ngrx/store Internal Initial State'\n);\nexport const INITIAL_STATE = new InjectionToken('@ngrx/store Initial State');\nexport const REDUCER_FACTORY = new InjectionToken(\n '@ngrx/store Reducer Factory'\n);\nexport const _REDUCER_FACTORY = new InjectionToken(\n '@ngrx/store Internal Reducer Factory Provider'\n);\nexport const INITIAL_REDUCERS = new InjectionToken(\n '@ngrx/store Initial Reducers'\n);\nexport const _INITIAL_REDUCERS = new InjectionToken(\n '@ngrx/store Internal Initial Reducers'\n);\nexport const STORE_FEATURES = new InjectionToken('@ngrx/store Store Features');\nexport const _STORE_REDUCERS = new InjectionToken(\n '@ngrx/store Internal Store Reducers'\n);\nexport const _FEATURE_REDUCERS = new InjectionToken(\n '@ngrx/store Internal Feature Reducers'\n);\n\nexport const _FEATURE_CONFIGS = new InjectionToken(\n '@ngrx/store Internal Feature Configs'\n);\n\nexport const _STORE_FEATURES = new InjectionToken(\n '@ngrx/store Internal Store Features'\n);\n\nexport const _FEATURE_REDUCERS_TOKEN = new InjectionToken(\n '@ngrx/store Internal Feature Reducers Token'\n);\nexport const FEATURE_REDUCERS = new InjectionToken(\n '@ngrx/store Feature Reducers'\n);\n\n/**\n * User-defined meta reducers from StoreModule.forRoot()\n */\nexport const USER_PROVIDED_META_REDUCERS = new InjectionToken<MetaReducer[]>(\n '@ngrx/store User Provided Meta Reducers'\n);\n\n/**\n * Meta reducers defined either internally by @ngrx/store or by library authors\n */\nexport const META_REDUCERS = new InjectionToken<MetaReducer[]>(\n '@ngrx/store Meta Reducers'\n);\n\n/**\n * Concats the user provided meta reducers and the meta reducers provided on the multi\n * injection token\n */\nexport const _RESOLVED_META_REDUCERS = new InjectionToken<MetaReducer>(\n '@ngrx/store Internal Resolved Meta Reducers'\n);\n\n/**\n * Runtime checks defined by the user via an InjectionToken\n * Defaults to `_USER_RUNTIME_CHECKS`\n */\nexport const USER_RUNTIME_CHECKS = new InjectionToken<RuntimeChecks>(\n '@ngrx/store User Runtime Checks Config'\n);\n\n/**\n * Runtime checks defined by the user via forRoot()\n */\nexport const _USER_RUNTIME_CHECKS = new InjectionToken<RuntimeChecks>(\n '@ngrx/store Internal User Runtime Checks Config'\n);\n\n/**\n * Runtime checks currently in use\n */\nexport const ACTIVE_RUNTIME_CHECKS = new InjectionToken<RuntimeChecks>(\n '@ngrx/store Internal Runtime Checks'\n);\n\nexport const _ACTION_TYPE_UNIQUENESS_CHECK = new InjectionToken<void>(\n '@ngrx/store Check if Action types are unique'\n);\n\n/**\n * InjectionToken that registers the global Store.\n * Mainly used to provide a hook that can be injected\n * to ensure the root state is loaded before something\n * that depends on it.\n */\nexport const ROOT_STORE_PROVIDER = new InjectionToken<void>(\n '@ngrx/store Root Store Provider'\n);\n\n/**\n * InjectionToken that registers feature states.\n * Mainly used to provide a hook that can be injected\n * to ensure feature state is loaded before something\n * that depends on it.\n */\nexport const FEATURE_STATE_PROVIDER = new InjectionToken<void>(\n '@ngrx/store Feature State Provider'\n);\n","import {\n Action,\n ActionReducer,\n ActionReducerFactory,\n ActionReducerMap,\n MetaReducer,\n InitialState,\n} from './models';\n\nexport function combineReducers<T, V extends Action = Action>(\n reducers: ActionReducerMap<T, V>,\n initialState?: Partial<T>\n): ActionReducer<T, V>;\n/**\n * @description\n * Combines reducers for individual features into a single reducer.\n *\n * You can use this function to delegate handling of state transitions to multiple reducers, each acting on their\n * own sub-state within the root state.\n *\n * @param reducers An object mapping keys of the root state to their corresponding feature reducer.\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * **Example combining two feature reducers into one \"root\" reducer**\n *\n * ```ts\n * export const reducer = combineReducers({\n * featureA: featureAReducer,\n * featureB: featureBReducer\n * });\n * ```\n *\n * You can also override the initial states of the sub-features:\n * ```ts\n * export const reducer = combineReducers({\n * featureA: featureAReducer,\n * featureB: featureBReducer\n * }, {\n * featureA: { counterA: 13 },\n * featureB: { counterB: 37 }\n * });\n * ```\n */\nexport function combineReducers(\n reducers: any,\n initialState: any = {}\n): ActionReducer<any, Action> {\n const reducerKeys = Object.keys(reducers);\n const finalReducers: any = {};\n\n for (let i = 0; i < reducerKeys.length; i++) {\n const key = reducerKeys[i];\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n const finalReducerKeys = Object.keys(finalReducers);\n\n return function combination(state, action) {\n state = state === undefined ? initialState : state;\n let hasChanged = false;\n const nextState: any = {};\n for (let i = 0; i < finalReducerKeys.length; i++) {\n const key = finalReducerKeys[i];\n const reducer: any = finalReducers[key];\n const previousStateForKey = state[key];\n const nextStateForKey = reducer(previousStateForKey, action);\n\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\nexport function omit<T extends { [key: string]: any }>(\n object: T,\n keyToRemove: keyof T\n): Partial<T> {\n return Object.keys(object)\n .filter((key) => key !== keyToRemove)\n .reduce((result, key) => Object.assign(result, { [key]: object[key] }), {});\n}\n\nexport function compose<A>(): (i: A) => A;\nexport function compose<A, B>(b: (i: A) => B): (i: A) => B;\nexport function compose<A, B, C>(c: (i: B) => C, b: (i: A) => B): (i: A) => C;\nexport function compose<A, B, C, D>(\n d: (i: C) => D,\n c: (i: B) => C,\n b: (i: A) => B\n): (i: A) => D;\nexport function compose<A, B, C, D, E>(\n e: (i: D) => E,\n d: (i: C) => D,\n c: (i: B) => C,\n b: (i: A) => B\n): (i: A) => E;\nexport function compose<A, B, C, D, E, F>(\n f: (i: E) => F,\n e: (i: D) => E,\n d: (i: C) => D,\n c: (i: B) => C,\n b: (i: A) => B\n): (i: A) => F;\nexport function compose<A = any, F = any>(...functions: any[]): (i: A) => F;\nexport function compose(...functions: any[]) {\n return function (arg: any) {\n if (functions.length === 0) {\n return arg;\n }\n\n const last = functions[functions.length - 1];\n const rest = functions.slice(0, -1);\n\n return rest.reduceRight((composed, fn) => fn(composed), last(arg));\n };\n}\n\nexport function createReducerFactory<T, V extends Action = Action>(\n reducerFactory: ActionReducerFactory<T, V>,\n metaReducers?: MetaReducer<T, V>[]\n): ActionReducerFactory<T, V> {\n if (Array.isArray(metaReducers) && metaReducers.length > 0) {\n (reducerFactory as any) = compose.apply(null, [\n ...metaReducers,\n reducerFactory,\n ]);\n }\n\n return (reducers: ActionReducerMap<T, V>, initialState?: InitialState<T>) => {\n const reducer = reducerFactory(reducers);\n return (state: T | undefined, action: V) => {\n state = state === undefined ? (initialState as T) : state;\n return reducer(state, action);\n };\n };\n}\n\nexport function createFeatureReducerFactory<T, V extends Action = Action>(\n metaReducers?: MetaReducer<T, V>[]\n): (reducer: ActionReducer<T, V>, initialState?: T) => ActionReducer<T, V> {\n const reducerFactory =\n Array.isArray(metaReducers) && metaReducers.length > 0\n ? compose<ActionReducer<T, V>>(...metaReducers)\n : (r: ActionReducer<T, V>) => r;\n\n return (reducer: ActionReducer<T, V>, initialState?: T) => {\n reducer = reducerFactory(reducer);\n\n return (state: T | undefined, action: V) => {\n state = state === undefined ? initialState : state;\n return reducer(state, action);\n };\n };\n}\n","import { Inject, Injectable, OnDestroy, Provider } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { ActionsSubject } from './actions_subject';\nimport {\n Action,\n ActionReducer,\n ActionReducerFactory,\n ActionReducerMap,\n StoreFeature,\n} from './models';\nimport { INITIAL_REDUCERS, INITIAL_STATE, REDUCER_FACTORY } from './tokens';\nimport {\n createFeatureReducerFactory,\n createReducerFactory,\n omit,\n} from './utils';\n\nexport abstract class ReducerObservable extends Observable<\n ActionReducer<any, any>\n> {}\nexport abstract class ReducerManagerDispatcher extends ActionsSubject {}\nexport const UPDATE = '@ngrx/store/update-reducers' as const;\n\n@Injectable()\nexport class ReducerManager\n extends BehaviorSubject<ActionReducer<any, any>>\n implements OnDestroy\n{\n get currentReducers(): ActionReducerMap<any, any> {\n return this.reducers;\n }\n\n constructor(\n private dispatcher: ReducerManagerDispatcher,\n @Inject(INITIAL_STATE) private initialState: any,\n @Inject(INITIAL_REDUCERS) private reducers: ActionReducerMap<any, any>,\n @Inject(REDUCER_FACTORY)\n private reducerFactory: ActionReducerFactory<any, any>\n ) {\n super(reducerFactory(reducers, initialState));\n }\n\n addFeature(feature: StoreFeature<any, any>) {\n this.addFeatures([feature]);\n }\n\n addFeatures(features: StoreFeature<any, any>[]) {\n const reducers = features.reduce(\n (\n reducerDict,\n { reducers, reducerFactory, metaReducers, initialState, key }\n ) => {\n const reducer =\n typeof reducers === 'function'\n ? createFeatureReducerFactory(metaReducers)(reducers, initialState)\n : createReducerFactory(reducerFactory, metaReducers)(\n reducers,\n initialState\n );\n\n reducerDict[key] = reducer;\n return reducerDict;\n },\n {} as { [key: string]: ActionReducer<any, any> }\n );\n\n this.addReducers(reducers);\n }\n\n removeFeature(feature: StoreFeature<any, any>) {\n this.removeFeatures([feature]);\n }\n\n removeFeatures(features: StoreFeature<any, any>[]) {\n this.removeReducers(features.map((p) => p.key));\n }\n\n addReducer(key: string, reducer: ActionReducer<any, any>) {\n this.addReducers({ [key]: reducer });\n }\n\n addReducers(reducers: { [key: string]: ActionReducer<any, any> }) {\n this.reducers = { ...this.reducers, ...reducers };\n this.updateReducers(Object.keys(reducers));\n }\n\n removeReducer(featureKey: string) {\n this.removeReducers([featureKey]);\n }\n\n removeReducers(featureKeys: string[]) {\n featureKeys.forEach((key) => {\n this.reducers = omit(this.reducers, key) /*TODO(#823)*/ as any;\n });\n this.updateReducers(featureKeys);\n }\n\n private updateReducers(featureKeys: string[]) {\n this.next(this.reducerFactory(this.reducers, this.initialState));\n this.dispatcher.next(<Action>{\n type: UPDATE,\n features: featureKeys,\n });\n }\n\n ngOnDestroy() {\n this.complete();\n }\n}\n\nexport const REDUCER_MANAGER_PROVIDERS: Provider[] = [\n ReducerManager,\n { provide: ReducerObservable, useExisting: ReducerManager },\n { provide: ReducerManagerDispatcher, useExisting: ActionsSubject },\n];\n","import { Injectable, OnDestroy, Provider } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { Action } from './models';\n\n@Injectable()\nexport class ScannedActionsSubject\n extends Subject<Action>\n implements OnDestroy\n{\n ngOnDestroy() {\n this.complete();\n }\n}\n\nexport const SCANNED_ACTIONS_SUBJECT_PROVIDERS: Provider[] = [\n ScannedActionsSubject,\n];\n","import { Inject, Injectable, OnDestroy, Provider, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {\n BehaviorSubject,\n Observable,\n queueScheduler,\n Subscription,\n} from 'rxjs';\nimport { observeOn, scan, withLatestFrom } from 'rxjs/operators';\n\nimport { ActionsSubject, INIT } from './actions_subject';\nimport { Action, ActionReducer } from './models';\nimport { ReducerObservable } from './reducer_manager';\nimport { ScannedActionsSubject } from './scanned_actions_subject';\nimport { INITIAL_STATE } from './tokens';\n\nexport abstract class StateObservable extends Observable<any> {\n /**\n * @internal\n */\n abstract readonly state: Signal<any>;\n}\n\n@Injectable()\nexport class State<T> extends BehaviorSubject<any> implements OnDestroy {\n static readonly INIT = INIT;\n\n private stateSubscription: Subscription;\n\n /**\n * @internal\n */\n public state: Signal<T>;\n\n constructor(\n actions$: ActionsSubject,\n reducer$: ReducerObservable,\n scannedActions: ScannedActionsSubject,\n @Inject(INITIAL_STATE) initialState: any\n ) {\n super(initialState);\n\n const actionsOnQueue$: Observable<Action> = actions$.pipe(\n observeOn(queueScheduler)\n );\n const withLatestReducer$: Observable<[Action, ActionReducer<any, Action>]> =\n actionsOnQueue$.pipe(withLatestFrom(reducer$));\n\n const seed: StateActionPair<T> = { state: initialState };\n const stateAndAction$: Observable<{\n state: any;\n action?: Action;\n }> = withLatestReducer$.pipe(\n scan<[Action, ActionReducer<T, Action>], StateActionPair<T>>(\n reduceState,\n seed\n )\n );\n\n this.stateSubscription = stateAndAction$.subscribe(({ state, action }) => {\n this.next(state);\n scannedActions.next(action as Action);\n });\n\n this.state = toSignal(this, { manualCleanup: true, requireSync: true });\n }\n\n ngOnDestroy() {\n this.stateSubscription.unsubscribe();\n this.complete();\n }\n}\n\nexport type StateActionPair<T, V extends Action = Action> = {\n state: T | undefined;\n action?: V;\n};\nexport function reduceState<T, V extends Action = Action>(\n stateActionPair: StateActionPair<T, V> = { state: undefined },\n [action, reducer]: [V, ActionReducer<T, V>]\n): StateActionPair<T, V> {\n const { state } = stateActionPair;\n return { state: reducer(state, action), action };\n}\n\nexport const STATE_PROVIDERS: Provider[] = [\n State,\n { provide: StateObservable, useExisting: State },\n];\n","// disabled because we have lowercase generics for `select`\nimport {\n computed,\n effect,\n EffectRef,\n inject,\n Injectable,\n Injector,\n Provider,\n Signal,\n untracked,\n} from '@angular/core';\nimport { Observable, Observer, Operator } from 'rxjs';\nimport { distinctUntilChanged, map, pluck } from 'rxjs/operators';\n\nimport { ActionsSubject } from './actions_subject';\nimport {\n Action,\n ActionReducer,\n CreatorsNotAllowedCheck,\n SelectSignalOptions,\n} from './models';\nimport { ReducerManager } from './reducer_manager';\nimport { StateObservable } from './state';\nimport { assertDefined } from './helpers';\n\n@Injectable()\nexport class Store<T = object>\n extends Observable<T>\n implements Observer<Action>\n{\n /**\n * @internal\n */\n readonly state: Signal<T>;\n\n constructor(\n state$: StateObservable,\n private actionsObserver: ActionsSubject,\n private reducerManager: ReducerManager,\n private injector?: Injector\n ) {\n super();\n\n this.source = state$;\n this.state = state$.state;\n }\n\n select<K>(mapFn: (state: T) => K): Observable<K>;\n /**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\n select<K, Props = any>(\n mapFn: (state: T, props: Props) => K,\n props: Props\n ): Observable<K>;\n select<a extends keyof T>(key: a): Observable<T[a]>;\n select<a extends keyof T, b extends keyof T[a]>(\n key1: a,\n key2: b\n ): Observable<T[a][b]>;\n select<a extends keyof T, b extends keyof T[a], c extends keyof T[a][b]>(\n key1: a,\n key2: b,\n key3: c\n ): Observable<T[a][b][c]>;\n select<\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c]\n >(key1: a, key2: b, key3: c, key4: d): Observable<T[a][b][c][d]>;\n select<\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d]\n >(key1: a, key2: b, key3: c, key4: d, key5: e): Observable<T[a][b][c][d][e]>;\n select<\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d],\n f extends keyof T[a][b][c][d][e]\n >(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e,\n key6: f\n ): Observable<T[a][b][c][d][e][f]>;\n select<\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d],\n f extends keyof T[a][b][c][d][e],\n K = any\n >(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e,\n key6: f,\n ...paths: string[]\n ): Observable<K>;\n select<Props = any, K = any>(\n pathOrMapFn: ((state: T, props?: Props) => K) | string,\n ...paths: string[]\n ): Observable<any> {\n return (select as any).call(null, pathOrMapFn, ...paths)(this);\n }\n\n /**\n * Returns a signal of the provided selector.\n *\n * @param selector selector function\n * @param options select signal options\n */\n selectSignal<K>(\n selector: (state: T) => K,\n options?: SelectSignalOptions<K>\n ): Signal<K> {\n return computed(() => selector(this.state()), options);\n }\n\n override lift<R>(operator: Operator<T, R>): Store<R> {\n const store = new Store<R>(this, this.actionsObserver, this.reducerManager);\n store.operator = operator;\n\n return store;\n }\n\n dispatch<V extends Action>(action: V & CreatorsNotAllowedCheck<V>): void;\n dispatch<V extends () => Action>(\n dispatchFn: V & CreatorsNotAllowedCheck<V>,\n config?: {\n injector: Injector;\n }\n ): EffectRef;\n dispatch<V extends Action | (() => Action)>(\n actionOrDispatchFn: V,\n config?: { injector?: Injector }\n ): EffectRef | void {\n if (typeof actionOrDispatchFn === 'function') {\n return this.processDispatchFn(actionOrDispatchFn, config);\n }\n this.actionsObserver.next(actionOrDispatchFn);\n }\n\n next(action: Action) {\n this.actionsObserver.next(action);\n }\n\n error(err: any) {\n this.actionsObserver.error(err);\n }\n\n complete() {\n this.actionsObserver.complete();\n }\n\n addReducer<State, Actions extends Action = Action>(\n key: string,\n reducer: ActionReducer<State, Actions>\n ) {\n this.reducerManager.addReducer(key, reducer);\n }\n\n removeReducer<Key extends Extract<keyof T, string>>(key: Key) {\n this.reducerManager.removeReducer(key);\n }\n\n private processDispatchFn(\n dispatchFn: () => Action,\n config?: { injector?: Injector }\n ) {\n assertDefined(this.injector, 'Store Injector');\n const effectInjector =\n config?.injector ?? getCallerInjector() ?? this.injector;\n\n return effect(\n () => {\n const action = dispatchFn();\n untracked(() => this.dispatch(action));\n },\n { injector: effectInjector }\n );\n }\n}\n\nexport const STORE_PROVIDERS: Provider[] = [Store];\n\nexport function select<T, K>(\n mapFn: (state: T) => K\n): (source$: Observable<T>) => Observable<K>;\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function select<T, Props, K>(\n mapFn: (state: T, props: Props) => K,\n props: Props\n): (source$: Observable<T>) => Observable<K>;\nexport function select<T, a extends keyof T>(\n key: a\n): (source$: Observable<T>) => Observable<T[a]>;\nexport function select<T, a extends keyof T, b extends keyof T[a]>(\n key1: a,\n key2: b\n): (source$: Observable<T>) => Observable<T[a][b]>;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b]\n>(\n key1: a,\n key2: b,\n key3: c\n): (source$: Observable<T>) => Observable<T[a][b][c]>;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c]\n>(\n key1: a,\n key2: b,\n key3: c,\n key4: d\n): (source$: Observable<T>) => Observable<T[a][b][c][d]>;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d]\n>(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e\n): (source$: Observable<T>) => Observable<T[a][b][c][d][e]>;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d],\n f extends keyof T[a][b][c][d][e]\n>(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e,\n key6: f\n): (source$: Observable<T>) => Observable<T[a][b][c][d][e][f]>;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d],\n f extends keyof T[a][b][c][d][e],\n K = any\n>(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e,\n key6: f,\n ...paths: string[]\n): (source$: Observable<T>) => Observable<K>;\nexport function select<T, Props, K>(\n pathOrMapFn: ((state: T, props?: Props) => any) | string,\n propsOrPath?: Props | string,\n ...paths: string[]\n) {\n return function selectOperator(source$: Observable<T>): Observable<K> {\n let mapped$: Observable<any>;\n\n if (typeof pathOrMapFn === 'string') {\n const pathSlices = [<string>propsOrPath, ...paths].filter(Boolean);\n mapped$ = source$.pipe(pluck(pathOrMapFn, ...pathSlices));\n } else if (typeof pathOrMapFn === 'function') {\n mapped$ = source$.pipe(\n map((source) => pathOrMapFn(source, <Props>propsOrPath))\n );\n } else {\n throw new TypeError(\n `Unexpected type '${typeof pathOrMapFn}' in select operator,` +\n ` expected 'string' or 'function'`\n );\n }\n\n return mapped$.pipe(distinctUntilChanged());\n };\n}\n\nfunction getCallerInjector() {\n try {\n return inject(Injector);\n } catch (_) {\n return undefined;\n }\n}\n","export const RUNTIME_CHECK_URL =\n 'https://ngrx.io/guide/store/configuration/runtime-checks';\n\nexport function isUndefined(target: any): target is undefined {\n return target === undefined;\n}\n\nexport function isNull(target: any): target is null {\n return target === null;\n}\n\nexport function isArray(target: any): target is Array<any> {\n return Array.isArray(target);\n}\n\nexport function isString(target: any): target is string {\n return typeof target === 'string';\n}\n\nexport function isBoolean(target: any): target is boolean {\n return typeof target === 'boolean';\n}\n\nexport function isNumber(target: any): target is number {\n return typeof target === 'number';\n}\n\nexport function isObjectLike(target: any): target is object {\n return typeof target === 'object' && target !== null;\n}\n\nexport function isObject(target: any): target is object {\n return isObjectLike(target) && !isArray(target);\n}\n\nexport function isPlainObject(target: any): target is object {\n if (!isObject(target)) {\n return false;\n }\n\n const targetPrototype = Object.getPrototypeOf(target);\n return targetPrototype === Object.prototype || targetPrototype === null;\n}\n\nexport function isFunction(target: any): target is () => void {\n return typeof target === 'function';\n}\n\nexport function isComponent(target: any) {\n return isFunction(target) && target.hasOwnProperty('ɵcmp');\n}\n\nexport function hasOwnProperty(target: object, propertyName: string): boolean {\n return Object.prototype.hasOwnProperty.call(target, propertyName);\n}\n","let _ngrxMockEnvironment = false;\nexport function setNgrxMockEnvironment(value: boolean): void {\n _ngrxMockEnvironment = value;\n}\nexport function isNgrxMockEnvironment(): boolean {\n return _ngrxMockEnvironment;\n}\n","import { Selector, SelectorWithProps } from './models';\nimport { isDevMode } from '@angular/core';\nimport { isNgrxMockEnvironment } from './flags';\n\nexport type AnyFn = (...args: any[]) => any;\n\nexport type MemoizedProjection = {\n memoized: AnyFn;\n reset: () => void;\n setResult: (result?: any) => void;\n clearResult: () => void;\n};\n\nexport type MemoizeFn = (t: AnyFn) => MemoizedProjection;\n\nexport type ComparatorFn = (a: any, b: any) => boolean;\n\nexport type DefaultProjectorFn<T> = (...args: any[]) => T;\n\nexport interface MemoizedSelector<\n State,\n Result,\n ProjectorFn = DefaultProjectorFn<Result>\n> extends Selector<State, Result> {\n release(): void;\n projector: ProjectorFn;\n setResult: (result?: Result) => void;\n clearResult: () => void;\n}\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see the {@link https://ngrx.io/guide/migration/v12#ngrxstore migration guide}\n */\nexport interface MemoizedSelectorWithProps<\n State,\n Props,\n Result,\n ProjectorFn = DefaultProjectorFn<Result>\n> extends SelectorWithProps<State, Props, Result> {\n release(): void;\n projector: ProjectorFn;\n setResult: (result?: Result) => void;\n clearResult: () => void;\n}\n\nexport function isEqualCheck(a: any, b: any): boolean {\n return a === b;\n}\n\nfunction isArgumentsChanged(\n args: IArguments,\n lastArguments: IArguments,\n comparator: ComparatorFn\n) {\n for (let i = 0; i < args.length; i++) {\n if (!comparator(args[i], lastArguments[i])) {\n return true;\n }\n }\n return false;\n}\n\nexport function resultMemoize(\n projectionFn: AnyFn,\n isResultEqual: ComparatorFn\n) {\n return defaultMemoize(projectionFn, isEqualCheck, isResultEqual);\n}\n\nexport function defaultMemoize(\n projectionFn: AnyFn,\n isArgumentsEqual = isEqualCheck,\n isResultEqual = isEqualCheck\n): MemoizedProjection {\n let lastArguments: null | IArguments = null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, , , , ,\n let lastResult: any = null;\n let overrideResult: any;\n\n function reset() {\n lastArguments = null;\n lastResult = null;\n }\n\n function setResult(result: any = undefined) {\n overrideResult = { result };\n }\n\n function clearResult() {\n overrideResult = undefined;\n }\n\n /* eslint-disable prefer-rest-params, prefer-spread */\n\n // disabled because of the use of `arguments`\n function memoized(): any {\n if (overrideResult !== undefined) {\n return overrideResult.result;\n }\n\n if (!lastArguments) {\n lastResult = projectionFn.apply(null, arguments as any);\n lastArguments = arguments;\n return lastResult;\n }\n\n if (!isArgumentsChanged(arguments, lastArguments, isArgumentsEqual)) {\n return lastResult;\n }\n\n const newResult = projectionFn.apply(null, arguments as any);\n lastArguments = arguments;\n\n if (isResultEqual(lastResult, newResult)) {\n return lastResult;\n }\n\n lastResult = newResult;\n\n return newResult;\n }\n\n return { memoized, reset, setResult, clearResult };\n}\n\nexport function createSelector<State, S1, Result>(\n s1: Selector<State, S1>,\n projector: (s1: S1) => Result\n): MemoizedSelector<State, Result, typeof projector>;\nexport function createSelector<State, S1, S2, Result>(\n s1: Selector<State, S1>,\n s2: Selector<State, S2>,\n projector: (s1: S1, s2: S2) => Result\n): MemoizedSelector<State, Result, typeof projector>;\nexport function createSelector<State, S1, S2, S3, Result>(\n s1: Selector<State, S1>,\n s2: Selector<State, S2>,\n s3: Selector<State, S3>,\n projector: (s1: S1, s2: S2, s3: S3) => Result\n): MemoizedSelector<State, Result, typeof projector>;\nexport function createSelector<State, S1, S2, S3, S4, Result>(\n s1: Selector<State, S1>,\n s2: Selector<State, S2>,\n s3: Selector<State, S3>,\n s4: Selector<State, S4>,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4) => Result\n): MemoizedSelector<State, Result, typeof projector>;\nexport function createSelector<State, S1, S2, S3, S4, S5, Result>(\n s1: Selector<State, S1>,\n s2: Selector<State, S2>,\n s3: Selector<State, S3>,\n s4: Selector<State, S4>,\n s5: Selector<State, S5>,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5) => Result\n): MemoizedSelector<State, Result, typeof projector>;\nexport function createSelector<State, S1, S2, S3, S4, S5, S6, Result>(\n s1: Selector<State, S1>,\n s2: Selector<State, S2>,\n s3: Selector<State, S3>,\n s4: Selector<State, S4>,\n s5: Selector<State, S5>,\n s6: Selector<State, S6>,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6) => Result\n): MemoizedSelector<State, Result, typeof projector>;\nexport function createSelector<State, S1, S2, S3, S4, S5, S6, S7, Result>(\n s1: Selector<State, S1>,\n s2: Selector<State, S2>,\n s3: Selector<State, S3>,\n s4: Selector<State, S4>,\n s5: Selector<State, S5>,\n s6: Selector<State, S6>,\n s7: Selector<State, S7>,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, s7: S7) => Result\n): MemoizedSelector<State, Result, typeof projector>;\nexport function createSelector<State, S1, S2, S3, S4, S5, S6, S7, S8, Result>(\n s1: Selector<State, S1>,\n s2: Selector<State, S2>,\n s3: Selector<State, S3>,\n s4: Selector<State, S4>,\n s5: Selector<State, S5>,\n s6: Selector<State, S6>,\n s7: Selector<State, S7>,\n s8: Selector<State, S8>,\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n s7: S7,\n s8: S8\n ) => Result\n): MemoizedSelector<State, Result, typeof projector>;\n\nexport function createSelector<\n Selectors extends Record<string, Selector<State, unknown>>,\n State = Selectors extends Record<string, Selector<infer S, unknown>>\n ? S\n : never,\n Result extends Record<string, unknown> = {\n [Key in keyof Selectors]: Selectors[Key] extends Selector<State, infer R>\n ? R\n : never;\n }\n>(selectors: Selectors): MemoizedSelector<State, Result, never>;\n\nexport function createSelector<State, Slices extends unknown[], Result>(\n ...args: [...slices: Selector<State, unknown>[], projector: unknown] &\n [\n ...slices: { [i in keyof Slices]: Selector<State, Slices[i]> },\n projector: (...s: Slices) => Result\n ]\n): MemoizedSelector<State, Result, (...s: Slices) => Result>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, Result>(\n s1: SelectorWithProps<State, Props, S1>,\n projector: (s1: S1, props: Props) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, S2, Result>(\n s1: SelectorWithProps<State, Props, S1>,\n s2: SelectorWithProps<State, Props, S2>,\n projector: (s1: S1, s2: S2, props: Props) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, S2, S3, Result>(\n s1: SelectorWithProps<State, Props, S1>,\n s2: SelectorWithProps<State, Props, S2>,\n s3: SelectorWithProps<State, Props, S3>,\n projector: (s1: S1, s2: S2, s3: S3, props: Props) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, S2, S3, S4, Result>(\n s1: SelectorWithProps<State, Props, S1>,\n s2: SelectorWithProps<State, Props, S2>,\n s3: SelectorWithProps<State, Props, S3>,\n s4: SelectorWithProps<State, Props, S4>,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, props: Props) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, S2, S3, S4, S5, Result>(\n s1: SelectorWithProps<State, Props, S1>,\n s2: SelectorWithProps<State, Props, S2>,\n s3: SelectorWithProps<State, Props, S3>,\n s4: SelectorWithProps<State, Props, S4>,\n s5: SelectorWithProps<State, Props, S5>,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, props: Props) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, S2, S3, S4, S5, S6, Result>(\n s1: SelectorWithProps<State, Props, S1>,\n s2: SelectorWithProps<State, Props, S2>,\n s3: SelectorWithProps<State, Props, S3>,\n s4: SelectorWithProps<State, Props, S4>,\n s5: SelectorWithProps<State, Props, S5>,\n s6: SelectorWithProps<State, Props, S6>,\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<\n State,\n Props,\n S1,\n S2,\n S3,\n S4,\n S5,\n S6,\n S7,\n Result\n>(\n s1: SelectorWithProps<State, Props, S1>,\n s2: SelectorWithProps<State, Props, S2>,\n s3: SelectorWithProps<State, Props, S3>,\n s4: SelectorWithProps<State, Props, S4>,\n s5: SelectorWithProps<State, Props, S5>,\n s6: SelectorWithProps<State, Props, S6>,\n s7: SelectorWithProps<State, Props, S7>,\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n s7: S7,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<\n State,\n Props,\n S1,\n S2,\n S3,\n S4,\n S5,\n S6,\n S7,\n S8,\n Result\n>(\n s1: SelectorWithProps<State, Props, S1>,\n s2: SelectorWithProps<State, Props, S2>,\n s3: SelectorWithProps<State, Props, S3>,\n s4: SelectorWithProps<State, Props, S4>,\n s5: SelectorWithProps<State, Props, S5>,\n s6: SelectorWithProps<State, Props, S6>,\n s7: SelectorWithProps<State, Props, S7>,\n s8: SelectorWithProps<State, Props, S8>,\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n s7: S7,\n s8: S8,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\nexport function createSelector<State, Slices extends unknown[], Result>(\n selectors: Selector<State, unknown>[] &\n [...{ [i in keyof Slices]: Selector<State, Slices[i]> }],\n projector: (...s: Slices) => Result\n): MemoizedSelector<State, Result, (...s: Slices) => Result>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, Result>(\n selectors: [SelectorWithProps<State, Props, S1>],\n projector: (s1: S1, props: Props) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, S2, Result>(\n selectors: [\n SelectorWithProps<State, Props, S1>,\n SelectorWithProps<State, Props, S2>\n ],\n projector: (s1: S1, s2: S2, props: Props) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<State, Props, S1, S2, S3, Result>(\n selectors: [\n SelectorWithProps<State, Props, S1>,\n SelectorWithProps<State, Props, S2>,\n SelectorWithProps<State, Props, S3>\n ],\n projector: (s1: S1, s2: S2, s3: S3, props: Props) => Result\n): MemoizedSelectorWithProps<State, Props, Result, typeof projector>;\n\n/**\n * @deprecated Selectors with props are