ngrx-rtk-query
Version:
Angular RTK Query
1 lines • 107 kB
Source Map (JSON)
{"version":3,"file":"ngrx-rtk-query-core.mjs","sources":["../../../../packages/ngrx-rtk-query/core/src/constants.ts","../../../../packages/ngrx-rtk-query/core/src/types/hooks-types.ts","../../../../packages/ngrx-rtk-query/core/src/useSerializedStableValue.ts","../../../../packages/ngrx-rtk-query/core/src/utils/capitalize.ts","../../../../packages/ngrx-rtk-query/core/src/utils/lazy-signal.ts","../../../../packages/ngrx-rtk-query/core/src/utils/shallow-equal.ts","../../../../packages/ngrx-rtk-query/core/src/utils/signal-proxy.ts","../../../../packages/ngrx-rtk-query/core/src/utils/tsHelpers.ts","../../../../packages/ngrx-rtk-query/core/src/build-hooks.ts","../../../../packages/ngrx-rtk-query/core/src/module.ts","../../../../packages/ngrx-rtk-query/core/src/fetch-base-query.ts","../../../../packages/ngrx-rtk-query/core/src/create-api.ts","../../../../packages/ngrx-rtk-query/core/ngrx-rtk-query-core.ts"],"sourcesContent":["export const UNINITIALIZED_VALUE = Symbol();\nexport type UninitializedValue = typeof UNINITIALIZED_VALUE;\n","import { type Signal } from '@angular/core';\nimport { type ThunkAction, type UnknownAction } from '@reduxjs/toolkit';\nimport {\n type BaseQueryFn,\n type EndpointDefinition,\n type InfiniteData,\n type InfiniteQueryActionCreatorResult,\n type InfiniteQueryArgFrom,\n type InfiniteQueryDefinition,\n type InfiniteQuerySubState,\n type MutationActionCreatorResult,\n type MutationDefinition,\n type MutationResultSelectorResult,\n type PageParamFrom,\n type PrefetchOptions,\n type QueryActionCreatorResult,\n type QueryArgFrom,\n type QueryDefinition,\n type QueryStatus,\n type QuerySubState,\n type ResultTypeFrom,\n type SkipToken,\n type SubscriptionOptions,\n type TSHelpersId,\n type TSHelpersNoInfer,\n type TSHelpersOverride,\n} from '@reduxjs/toolkit/query';\n\nimport { type UninitializedValue } from '../constants';\nimport { type DeepSignal, type SignalsMap } from '../utils';\n\nexport type QueryHooks<Definition extends QueryDefinition<any, any, any, any, any>> = {\n useQuery: UseQuery<Definition>;\n useLazyQuery: UseLazyQuery<Definition>;\n useQuerySubscription: UseQuerySubscription<Definition>;\n useLazyQuerySubscription: UseLazyQuerySubscription<Definition>;\n useQueryState: UseQueryState<Definition>;\n};\n\nexport type InfiniteQueryHooks<Definition extends InfiniteQueryDefinition<any, any, any, any, any>> = {\n useInfiniteQuery: UseInfiniteQuery<Definition>;\n useInfiniteQuerySubscription: UseInfiniteQuerySubscription<Definition>;\n useInfiniteQueryState: UseInfiniteQueryState<Definition>;\n};\n\nexport type MutationHooks<Definition extends MutationDefinition<any, any, any, any, any>> = {\n useMutation: UseMutation<Definition>;\n};\n\n/**\n * A hook that automatically triggers fetches of data from an endpoint, 'subscribes' the component\n * to the cached data, and reads the request status and cached data from the Redux store. The component\n * will re-render as the loading status changes and the data becomes available.\n *\n * The query arg is used as a cache key. Changing the query arg will tell the hook to re-fetch the data if\n * it does not exist in the cache already, and the hook will return the data for that query arg once it's available.\n *\n * This hook combines the functionality of both [`useQueryState`](#usequerystate) and\n * [`useQuerySubscription`](#usequerysubscription) together, and is intended to be used in the majority of situations.\n *\n * #### Features\n *\n * - Automatically triggers requests to retrieve data based on the hook argument and whether cached data\n * exists by default\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met\n * - Returns the latest request status and cached data from the Redux store\n * - Re-renders as the request status changes and data becomes available\n */\nexport type UseQuery<D extends QueryDefinition<any, any, any, any>> = <\n R extends Record<string, any> = UseQueryStateDefaultResult<D>,\n>(\n arg: Signal<QueryArgFrom<D> | SkipToken> | (() => QueryArgFrom<D> | SkipToken) | QueryArgFrom<D> | SkipToken,\n options?: UseQueryOptions<D, R> | Signal<UseQueryOptions<D, R>> | (() => UseQueryOptions<D, R>),\n) => UseQueryHookResult<D, R>;\n\nexport type TypedUseQuery<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = UseQuery<\n QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>\n>;\n\nexport type UseQueryOptions<\n D extends QueryDefinition<any, any, any, any>,\n R extends Record<string, any> = UseQueryStateDefaultResult<D>,\n> = UseQuerySubscriptionOptions & UseQueryStateOptions<D, R>;\n\nexport type QueryOptions<\n SelectFromResultType extends Record<string, any> = UseQueryStateDefaultResult<QueryDefinition<any, any, any, any>>,\n> = UseQueryOptions<any, SelectFromResultType>;\n\nexport type UseQueryHookResult<\n D extends QueryDefinition<any, any, any, any>,\n R = UseQueryStateDefaultResult<D>,\n> = UseQueryStateResult<D, R> & UseQuerySubscriptionResult<D>;\n\n/**\n * Helper type to manually type the result\n * of the `useQuery` hook in userland code.\n */\nexport type TypedUseQueryHookResult<\n ResultType,\n QueryArg,\n BaseQuery extends BaseQueryFn,\n R = UseQueryStateDefaultResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>,\n> = TypedUseQueryStateResult<ResultType, QueryArg, BaseQuery, R> &\n TypedUseQuerySubscriptionResult<ResultType, QueryArg, BaseQuery>;\n\nexport type UseQuerySubscriptionOptions = SubscriptionOptions & {\n /**\n * Prevents a query from automatically running.\n *\n * @remarks\n * When `skip` is true (or `skipToken` is passed in as `arg`):\n *\n * - **If the query has cached data:**\n * * The cached data **will not be used** on the initial load, and will ignore updates from\n * any identical query until the `skip` condition is removed\n * * The query will have a status of `uninitialized`\n * * If `skip: false` is set after the initial load, the cached result will be used\n * - **If the query does not have cached data:**\n * * The query will have a status of `uninitialized`\n * * The query will not exist in the state when viewed with the dev tools\n * * The query will not automatically fetch on mount\n * * The query will not automatically run when additional components with the same query are added that do run\n *\n * @example\n * ```tsx\n * // codeblock-meta no-transpile title=\"Skip example\"\n * const query = useGetPokemonByNameQuery(name, { skip: true });\n * ```\n */\n skip?: boolean;\n /**\n * Defaults to `false`. This setting allows you to control whether if a cached result is already available, RTK Query will only serve a cached result, or if it should `refetch` when set to `true` or if an adequate amount of time has passed since the last successful query result.\n * - `false` - Will not cause a query to be performed _unless_ it does not exist yet.\n * - `true` - Will always refetch when a new subscriber to a query is added. Behaves the same as calling the `refetch` callback or passing `forceRefetch: true` in the action creator.\n * - `number` - **Value is in seconds**. If a number is provided and there is an existing query in the cache, it will\n * compare the current time vs the last fulfilled timestamp, and only refetch if enough time has elapsed.\n *\n * If you specify this option alongside `skip: true`, this **will not be evaluated** until `skip` is false.\n */\n refetchOnMountOrArgChange?: boolean | number;\n};\n\n/**\n * A hook that automatically triggers fetches of data from an endpoint, and 'subscribes' the\n * component to the cached data.\n *\n * The query arg is used as a cache key. Changing the query arg will tell the hook to re-fetch\n * the data if it does not exist in the cache already.\n *\n * Note that this hook does not return a request status or cached data. For that use-case,\n * see [`useQuery`](#usequery) or [`useQueryState`](#usequerystate).\n *\n * #### Features\n *\n * - Automatically triggers requests to retrieve data based on the hook argument and whether\n * cached data exists by default\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met\n */\nexport type UseQuerySubscription<D extends QueryDefinition<any, any, any, any>> = (\n arg: Signal<QueryArgFrom<D> | SkipToken> | (() => QueryArgFrom<D> | SkipToken) | QueryArgFrom<D> | SkipToken,\n options?: UseQuerySubscriptionOptions | Signal<UseQuerySubscriptionOptions> | (() => UseQuerySubscriptionOptions),\n) => UseQuerySubscriptionResult<D>;\n\nexport type TypedUseQuerySubscription<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = UseQuerySubscription<\n QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>\n>;\n\nexport type UseQuerySubscriptionResult<D extends QueryDefinition<any, any, any, any>> = Pick<\n QueryActionCreatorResult<D>,\n 'refetch'\n>;\n\n/**\n * Helper type to manually type the result\n * of the `useQuerySubscription` hook in userland code.\n */\nexport type TypedUseQuerySubscriptionResult<\n ResultType,\n QueryArg,\n BaseQuery extends BaseQueryFn,\n> = UseQuerySubscriptionResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>;\n\nexport type LazyQueryTrigger<D extends QueryDefinition<any, any, any, any>> = {\n /**\n * Triggers a lazy query.\n *\n * By default, this will start a new request even if there is already a value in the cache.\n * If you want to use the cache value and only start a request if there is no cache value,\n * set the second argument to `true`.\n *\n * @remarks\n * If you need to access the error or success payload immediately after a lazy query, you can chain .unwrap().\n *\n * @example\n * ```ts\n * // codeblock-meta title=\"Using .unwrap with async await\"\n * try {\n * const payload = await xxxLazyQuery(1).unwrap();\n * console.log('fulfilled', payload)\n * } catch (error) {\n * console.error('rejected', error);\n * }\n * ```\n */\n (arg: QueryArgFrom<D>, extra?: { preferCacheValue?: boolean }): QueryActionCreatorResult<D>;\n};\n\nexport type TypedLazyQueryTrigger<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = LazyQueryTrigger<\n QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>\n>;\n\nexport type UseLazyQueryLastPromiseInfo<D extends QueryDefinition<any, any, any, any>> = {\n lastArg: Signal<QueryArgFrom<D>>;\n};\n\n/**\n * A hook similar to [`useQuery`](#usequery), but with manual control over when the data fetching occurs.\n *\n * This hook includes the functionality of [`useLazyQuerySubscription`](#uselazyquerysubscription).\n *\n * #### Features\n *\n * - Manual control over firing a request to retrieve data\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\n * - Returns the latest request status and cached data from the Redux store\n * - Re-renders as the request status changes and data becomes available\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is\n * met and the fetch has been manually called at least once\n *\n * #### Note\n *\n * When the trigger function returned from a LazyQuery is called, it always initiates a new request to the server even\n * if there is cached data. Set `preferCacheValue`(the second argument to the function) as `true` if you want it to\n * immediately return a cached value if one exists.\n */\nexport type UseLazyQuery<D extends QueryDefinition<any, any, any, any>> = <\n R extends Record<string, any> = UseQueryStateDefaultResult<D>,\n>(\n options?: UseLazyQueryOptions<D, R> | Signal<UseLazyQueryOptions<D, R>> | (() => UseLazyQueryOptions<D, R>),\n) => LazyQueryTrigger<D> & UseLazyQueryStateResult<D, R> & UseLazyQueryLastPromiseInfo<D>;\n\nexport type UseLazyQueryStateResult<\n D extends QueryDefinition<any, any, any, any>,\n R = UseQueryStateDefaultResult<D>,\n> = SignalsMap<TSHelpersNoInfer<R>> & {\n /**\n * Resets the hook state to its initial `uninitialized` state.\n * This will also remove the last result from the cache.\n */\n reset: () => void;\n};\n\n/**\n * Helper type to manually type the result\n * of the `useLazyQuery` hook in userland code.\n */\nexport type TypedUseLazyQueryStateResult<\n ResultType,\n QueryArg,\n BaseQuery extends BaseQueryFn,\n R = UseQueryStateDefaultResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>,\n> = UseLazyQueryStateResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>, R>;\n\nexport type TypedUseLazyQuery<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = UseLazyQuery<\n QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>\n>;\n\nexport type UseLazyQueryOptions<\n D extends QueryDefinition<any, any, any, any>,\n R extends Record<string, any> = UseQueryStateDefaultResult<D>,\n> = SubscriptionOptions & Omit<UseQueryStateOptions<D, R>, 'skip'>;\n\nexport type LazyQueryOptions<\n SelectFromResultType extends Record<string, any> = UseQueryStateDefaultResult<QueryDefinition<any, any, any, any>>,\n> = UseLazyQueryOptions<any, SelectFromResultType>;\n\n/**\n * A hook similar to [`useQuerySubscription`](#usequerysubscription), but with manual control over when\n * the data fetching occurs.\n *\n * Note that this hook does not return a request status or cached data. For that use-case,\n * see [`useLazyQuery`](#uselazyquery).\n *\n * #### Features\n *\n * - Manual control over firing a request to retrieve data\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met\n * and the fetch has been manually called at least once\n */\nexport type UseLazyQuerySubscription<D extends QueryDefinition<any, any, any, any>> = (\n options?: SubscriptionOptions | Signal<SubscriptionOptions> | (() => SubscriptionOptions),\n) => readonly [LazyQueryTrigger<D>, Signal<QueryArgFrom<D> | UninitializedValue>, { reset: () => void }];\n\nexport type TypedUseLazyQuerySubscription<\n ResultType,\n QueryArg,\n BaseQuery extends BaseQueryFn,\n> = UseLazyQuerySubscription<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>;\n\n/**\n * @internal\n */\nexport type QueryStateSelector<R extends Record<string, any>, D extends QueryDefinition<any, any, any, any>> = (\n state: UseQueryStateDefaultResult<D>,\n) => R;\n\nexport type TypedUseQueryState<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = UseQueryState<\n QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>\n>;\n\n/**\n * Provides a way to define a strongly-typed version of\n * {@linkcode QueryStateSelector} for use with a specific query.\n * This is useful for scenarios where you want to create a \"pre-typed\"\n * {@linkcode UseQueryStateOptions.selectFromResult | selectFromResult}\n * function.\n *\n * @example\n * <caption>#### __Create a strongly-typed `selectFromResult` selector function__</caption>\n *\n * ```tsx\n * import type { TypedQueryStateSelector } from 'ngrx-rtk-query'\n * import { createApi, fetchBaseQuery } from 'ngrx-rtk-query'\n *\n * type Post = {\n * id: number\n * title: string\n * }\n *\n * type PostsApiResponse = {\n * posts: Post[]\n * total: number\n * skip: number\n * limit: number\n * }\n *\n * type QueryArgument = number | undefined\n *\n * type BaseQueryFunction = ReturnType<typeof fetchBaseQuery>\n *\n * type SelectedResult = Pick<PostsApiResponse, 'posts'>\n *\n * const postsApiSlice = createApi({\n * baseQuery: fetchBaseQuery({ baseUrl: 'https://dummyjson.com/posts' }),\n * reducerPath: 'postsApi',\n * tagTypes: ['Posts'],\n * endpoints: (build) => ({\n * getPosts: build.query<PostsApiResponse, QueryArgument>({\n * query: (limit = 5) => `?limit=${limit}&select=title`,\n * }),\n * }),\n * })\n *\n * const { useGetPostsQuery } = postsApiSlice\n *\n * ...\n *\n * const typedSelectFromResult: TypedQueryStateSelector<\n * PostsApiResponse,\n * QueryArgument,\n * BaseQueryFunction,\n * SelectedResult\n * > = (state) => ({ posts: state.data?.posts ?? EMPTY_ARRAY })\n *\n * ...\n *\n * getPostsQuery = useGetPostsQuery(undefined, {\n * selectFromResult: typedSelectFromResult,\n * })\n *\n * ...\n * ```\n *\n * @template ResultType - The type of the result `data` returned by the query.\n * @template QueryArgumentType - The type of the argument passed into the query.\n * @template BaseQueryFunctionType - The type of the base query function being used.\n * @template SelectedResultType - The type of the selected result returned by the __`selectFromResult`__ function.\n *\n * @since 18.1.0\n * @public\n */\nexport type TypedQueryStateSelector<\n ResultType,\n QueryArgumentType,\n BaseQueryFunctionType extends BaseQueryFn,\n SelectedResultType extends Record<string, any> = UseQueryStateDefaultResult<\n QueryDefinition<QueryArgumentType, BaseQueryFunctionType, string, ResultType, string>\n >,\n> = QueryStateSelector<\n SelectedResultType,\n QueryDefinition<QueryArgumentType, BaseQueryFunctionType, string, ResultType, string>\n>;\n\n/**\n * A hook that reads the request status and cached data from the Redux store. The component will re-render\n * as the loading status changes and the data becomes available.\n *\n * Note that this hook does not trigger fetching new data. For that use-case,\n * see [`useQuery`](#usequery) or [`useQuerySubscription`](#usequerysubscription).\n *\n * #### Features\n *\n * - Returns the latest request status and cached data from the Redux store\n * - Re-renders as the request status changes and data becomes available\n */\nexport type UseQueryState<D extends QueryDefinition<any, any, any, any>> = <\n R extends Record<string, any> = UseQueryStateDefaultResult<D>,\n>(\n arg: Signal<QueryArgFrom<D> | SkipToken> | (() => QueryArgFrom<D> | SkipToken) | QueryArgFrom<D> | SkipToken,\n options?: UseQueryStateOptions<D, R> | Signal<UseQueryStateOptions<D, R>> | (() => UseQueryStateOptions<D, R>),\n) => UseQueryStateResult<D, R>;\n\n/**\n * @internal\n */\nexport type UseQueryStateOptions<D extends QueryDefinition<any, any, any, any>, R extends Record<string, any>> = {\n /**\n * Prevents a query from automatically running.\n *\n * @remarks\n * When skip is true:\n *\n * - **If the query has cached data:**\n * * The cached data **will not be used** on the initial load, and will ignore updates from\n * any identical query until the `skip` condition is removed\n * * The query will have a status of `uninitialized`\n * * If `skip: false` is set after skipping the initial load, the cached result will be used\n * - **If the query does not have cached data:**\n * * The query will have a status of `uninitialized`\n * * The query will not exist in the state when viewed with the dev tools\n * * The query will not automatically fetch on mount\n * * The query will not automatically run when additional components with the same query are added that do run\n *\n * @example\n * ```ts\n * // codeblock-meta no-transpile title=\"Skip example\"\n * const query = useGetPokemonByNameQuery(name, { skip: true });\n * ```\n */\n skip?: boolean;\n /**\n * `selectFromResult` allows you to get a specific segment from a query result in a performant manner.\n * When using this feature, the component will not rerender unless the underlying data of the selected\n * item has changed.\n * If the selected item is one element in a larger collection, it will disregard changes to elements in\n * the same collection.\n *\n * @example\n * ```ts\n * // codeblock-meta title=\"Using selectFromResult to extract a single result\"\n * post = api.useGetPostsQuery(undefined, {\n * selectFromResult: ({ data }) => ({ post: data?.find((post) => post.id === id) }),\n * });\n * ```\n */\n selectFromResult?: QueryStateSelector<R, D>;\n};\n\n/**\n * Provides a way to define a \"pre-typed\" version of\n * {@linkcode UseQueryStateOptions} with specific options for a given query.\n * This is particularly useful for setting default query behaviors such as\n * refetching strategies, which can be overridden as needed.\n *\n * @example\n * <caption>#### __Create a `useQuery` hook with default options__</caption>\n *\n * ```ts\n * import type {\n * SubscriptionOptions,\n * TypedUseQueryStateOptions,\n * } from 'ngrx-rtk-query'\n * import { createApi, fetchBaseQuery } from 'ngrx-rtk-query'\n *\n * type Post = {\n * id: number\n * name: string\n * }\n *\n * const api = createApi({\n * baseQuery: fetchBaseQuery({ baseUrl: '/' }),\n * tagTypes: ['Post'],\n * endpoints: (build) => ({\n * getPosts: build.query<Post[], void>({\n * query: () => 'posts',\n * }),\n * }),\n * })\n *\n * const { useGetPostsQuery } = api\n *\n * export const useGetPostsQueryWithDefaults = <\n * SelectedResult extends Record<string, any>,\n * >(\n * overrideOptions: TypedUseQueryStateOptions<\n * Post[],\n * void,\n * ReturnType<typeof fetchBaseQuery>,\n * SelectedResult\n * > &\n * SubscriptionOptions,\n * ) =>\n * useGetPostsQuery(undefined, {\n * // Insert default options here\n *\n * refetchOnMountOrArgChange: true,\n * refetchOnFocus: true,\n * ...overrideOptions,\n * })\n * ```\n *\n * @template ResultType - The type of the result `data` returned by the query.\n * @template QueryArg - The type of the argument passed into the query.\n * @template BaseQuery - The type of the base query function being used.\n * @template SelectedResult - The type of the selected result returned by the __`selectFromResult`__ function.\n *\n * @since 18.1.0\n * @public\n */\nexport type TypedUseQueryStateOptions<\n ResultType,\n QueryArg,\n BaseQuery extends BaseQueryFn,\n SelectedResult extends Record<string, any> = UseQueryStateDefaultResult<\n QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>\n >,\n> = UseQueryStateOptions<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>, SelectedResult>;\n\nexport type UseQueryStateResult<_ extends QueryDefinition<any, any, any, any>, R> = DeepSignal<TSHelpersNoInfer<R>>;\n\n/**\n * Helper type to manually type the result\n * of the `useQueryState` hook in userland code.\n */\nexport type TypedUseQueryStateResult<\n ResultType,\n QueryArg,\n BaseQuery extends BaseQueryFn,\n R = UseQueryStateDefaultResult<QueryDefinition<QueryArg, BaseQuery, string, ResultType, string>>,\n> = DeepSignal<TSHelpersNoInfer<R>>;\n\ntype UseQueryStateBaseResult<D extends QueryDefinition<any, any, any, any>> = QuerySubState<D> & {\n /**\n * Where `data` tries to hold data as much as possible, also re-using\n * data from the last arguments passed into the hook, this property\n * will always contain the received data from the query, for the current query arguments.\n */\n currentData?: ResultTypeFrom<D>;\n /**\n * Query has not started yet.\n */\n isUninitialized: false;\n /**\n * Query is currently loading for the first time. No data yet.\n */\n isLoading: false;\n /**\n * Query is currently fetching, but might have data from an earlier request.\n */\n isFetching: false;\n /**\n * Query has data from a successful load.\n */\n isSuccess: false;\n /**\n * Query is currently in \"error\" state.\n */\n isError: false;\n};\n\nexport type UseQueryStateDefaultResult<D extends QueryDefinition<any, any, any, any>> = TSHelpersId<\n | TSHelpersOverride<\n Extract<UseQueryStateBaseResult<D>, { status: QueryStatus.uninitialized }>,\n { isUninitialized: true }\n >\n | TSHelpersOverride<\n UseQueryStateBaseResult<D>,\n | { isLoading: true; isFetching: boolean; data: undefined }\n | ({\n isSuccess: true;\n isFetching: true;\n error: undefined;\n } & Required<Pick<UseQueryStateBaseResult<D>, 'data' | 'fulfilledTimeStamp'>>)\n | ({\n isSuccess: true;\n isFetching: false;\n error: undefined;\n } & Required<Pick<UseQueryStateBaseResult<D>, 'data' | 'fulfilledTimeStamp' | 'currentData'>>)\n | ({ isError: true } & Required<Pick<UseQueryStateBaseResult<D>, 'error'>>)\n >\n> & {\n /**\n * @deprecated Included for completeness, but discouraged.\n * Please use the `isLoading`, `isFetching`, `isSuccess`, `isError`\n * and `isUninitialized` flags instead\n */\n status: QueryStatus;\n};\n\nexport type InfiniteQueryDirection = 'forward' | 'backward';\n\nexport type LazyInfiniteQueryTrigger<D extends InfiniteQueryDefinition<any, any, any, any, any>> = {\n /**\n * Triggers a lazy query.\n *\n * By default, this will start a new request even if there is already a value in the cache.\n * If you want to use the cache value and only start a request if there is no cache value, set the second argument to `true`.\n *\n * @remarks\n * If you need to access the error or success payload immediately after a lazy query, you can chain .unwrap().\n *\n * @example\n * ```ts\n * // codeblock-meta title=\"Using .unwrap with async await\"\n * try {\n * const payload = await getUserById(1).unwrap();\n * console.log('fulfilled', payload)\n * } catch (error) {\n * console.error('rejected', error);\n * }\n * ```\n */\n (arg: QueryArgFrom<D>, direction: InfiniteQueryDirection): InfiniteQueryActionCreatorResult<D>;\n};\n\nexport interface UseInfiniteQuerySubscriptionOptions<D extends InfiniteQueryDefinition<any, any, any, any, any>>\n extends SubscriptionOptions {\n /**\n * Prevents a query from automatically running.\n *\n * @remarks\n * When `skip` is true (or `skipToken` is passed in as `arg`):\n *\n * - **If the query has cached data:**\n * * The cached data **will not be used** on the initial load, and will ignore updates from any identical query until the `skip` condition is removed\n * * The query will have a status of `uninitialized`\n * * If `skip: false` is set after the initial load, the cached result will be used\n * - **If the query does not have cached data:**\n * * The query will have a status of `uninitialized`\n * * The query will not exist in the state when viewed with the dev tools\n * * The query will not automatically fetch on mount\n * * The query will not automatically run when additional components with the same query are added that do run\n *\n * @example\n * ```tsx\n * // codeblock-meta no-transpile title=\"Skip example\"\n * name = input.required<string>()\n * skipCall = input(true);\n *\n * getPokemonByNameQuery = useGetPokemonByNameQuery(name, () => ({\n * skip: this.skipCall(),\n * }));\n * };\n * ```\n */\n skip?: boolean;\n /**\n * Defaults to `false`. This setting allows you to control whether if a cached result is already available, RTK Query will only serve a cached result, or if it should `refetch` when set to `true` or if an adequate amount of time has passed since the last successful query result.\n * - `false` - Will not cause a query to be performed _unless_ it does not exist yet.\n * - `true` - Will always refetch when a new subscriber to a query is added. Behaves the same as calling the `refetch` callback or passing `forceRefetch: true` in the action creator.\n * - `number` - **Value is in seconds**. If a number is provided and there is an existing query in the cache, it will compare the current time vs the last fulfilled timestamp, and only refetch if enough time has elapsed.\n *\n * If you specify this option alongside `skip: true`, this **will not be evaluated** until `skip` is false.\n */\n refetchOnMountOrArgChange?: boolean | number;\n initialPageParam?: PageParamFrom<D>;\n}\n\nexport type TypedUseInfiniteQuerySubscription<\n ResultType,\n QueryArg,\n PageParam,\n BaseQuery extends BaseQueryFn,\n> = UseInfiniteQuerySubscription<InfiniteQueryDefinition<QueryArg, PageParam, BaseQuery, string, ResultType, string>>;\n\nexport type UseInfiniteQuerySubscriptionResult<D extends InfiniteQueryDefinition<any, any, any, any, any>> = Pick<\n InfiniteQueryActionCreatorResult<D>,\n 'refetch'\n> & {\n trigger: LazyInfiniteQueryTrigger<D>;\n fetchNextPage: () => InfiniteQueryActionCreatorResult<D>;\n fetchPreviousPage: () => InfiniteQueryActionCreatorResult<D>;\n};\n\n/**\n * Helper type to manually type the result\n * of the `useQuerySubscription` hook in userland code.\n */\nexport type TypedUseInfiniteQuerySubscriptionResult<\n ResultType,\n QueryArg,\n PageParam,\n BaseQuery extends BaseQueryFn,\n> = UseInfiniteQuerySubscriptionResult<\n InfiniteQueryDefinition<QueryArg, PageParam, BaseQuery, string, ResultType, string>\n>;\n\nexport type InfiniteQueryStateSelector<\n R extends Record<string, any>,\n D extends InfiniteQueryDefinition<any, any, any, any, any>,\n> = (state: UseInfiniteQueryStateDefaultResult<D>) => R;\n\n/**\n * A hook that automatically triggers fetches of data from an endpoint, 'subscribes' the component to the cached data, and reads the request status and cached data from the Redux store. The component will re-render as the loading status changes and the data becomes available. Additionally, it will cache multiple \"pages\" worth of responses within a single cache entry, and allows fetching more pages forwards and backwards from the current cached pages.\n *\n * The query arg is used as a cache key. Changing the query arg will tell the hook to re-fetch the data if it does not exist in the cache already, and the hook will return the data for that query arg once it's available.\n *\n * The `data` field will be a `{pages: Data[], pageParams: PageParam[]}` structure containing all fetched page responses and the corresponding page param values for each page. You may use this to render individual pages, combine all pages into a single infinite list, or other display logic as needed.\n *\n * This hook combines the functionality of both [`useInfiniteQueryState`](#useinfinitequerystate) and [`useInfiniteQuerySubscription`](#useinfinitequerysubscription) together, and is intended to be used in the majority of situations.\n *\n * As with normal query hooks, `skipToken` is a valid argument that will skip the query from executing.\n *\n * By default, the initial request will use the `initialPageParam` value that was defined on the infinite query endpoint. If you want to start from a different value, you can pass `initialPageParam` as part of the hook options to override that initial request value.\n *\n * Use the returned `fetchNextPage` and `fetchPreviousPage` methods on the hook result object to trigger fetches forwards and backwards. These will always calculate the next or previous page param based on the current cached pages and the provided `getNext/PreviousPageParam` callbacks defined in the endpoint.\n *\n *\n * #### Features\n *\n * - Automatically triggers requests to retrieve data based on the hook argument and whether cached data exists by default\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\n * - Caches multiple pages worth of responses, and provides methods to trigger more page fetches forwards and backwards\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met\n * - Returns the latest request status and cached data from the Redux store\n * - Re-renders as the request status changes and data becomes available\n */\nexport type UseInfiniteQuery<D extends InfiniteQueryDefinition<any, any, any, any, any>> = <\n R extends Record<string, any> = UseInfiniteQueryStateDefaultResult<D>,\n>(\n arg:\n | Signal<InfiniteQueryArgFrom<D> | SkipToken>\n | (() => InfiniteQueryArgFrom<D> | SkipToken)\n | InfiniteQueryArgFrom<D>\n | SkipToken,\n options?:\n | (UseInfiniteQuerySubscriptionOptions<D> & UseInfiniteQueryStateOptions<D, R>)\n | Signal<UseInfiniteQuerySubscriptionOptions<D> & UseInfiniteQueryStateOptions<D, R>>\n | (() => UseInfiniteQuerySubscriptionOptions<D> & UseInfiniteQueryStateOptions<D, R>),\n) => UseInfiniteQueryHookResult<D, R> &\n Pick<UseInfiniteQuerySubscriptionResult<D>, 'fetchNextPage' | 'fetchPreviousPage'>;\n\n/**\n * A hook that reads the request status and cached data from the Redux store. The component will re-render as the loading status changes and the data becomes available.\n *\n * Note that this hook does not trigger fetching new data. For that use-case, see [`useInfiniteQuery`](#useinfinitequery) or [`useInfiniteQuerySubscription`](#useinfinitequerysubscription).\n *\n * #### Features\n *\n * - Returns the latest request status and cached data from the Redux store\n * - Re-renders as the request status changes and data becomes available\n */\nexport type UseInfiniteQueryState<D extends InfiniteQueryDefinition<any, any, any, any, any>> = <\n R extends Record<string, any> = UseInfiniteQueryStateDefaultResult<D>,\n>(\n arg: Signal<QueryArgFrom<D> | SkipToken> | (() => QueryArgFrom<D> | SkipToken) | QueryArgFrom<D> | SkipToken,\n options?:\n | UseInfiniteQueryStateOptions<D, R>\n | Signal<UseInfiniteQueryStateOptions<D, R>>\n | (() => UseInfiniteQueryStateOptions<D, R>),\n) => UseInfiniteQueryStateResult<D, R>;\n\nexport type TypedUseInfiniteQueryState<\n ResultType,\n QueryArg,\n PageParam,\n BaseQuery extends BaseQueryFn,\n> = UseInfiniteQueryState<InfiniteQueryDefinition<QueryArg, PageParam, BaseQuery, string, ResultType, string>>;\n\n/**\n * A hook that automatically triggers fetches of data from an endpoint, and 'subscribes' the component to the cached data. Additionally, it will cache multiple \"pages\" worth of responses within a single cache entry, and allows fetching more pages forwards and backwards from the current cached pages.\n *\n * The query arg is used as a cache key. Changing the query arg will tell the hook to re-fetch the data if it does not exist in the cache already.\n *\n * Note that this hook does not return a request status or cached data. For that use-case, see [`useInfiniteQuery`](#useinfinitequery) or [`useInfiniteQueryState`](#useinfinitequerystate).\n *\n * #### Features\n *\n * - Automatically triggers requests to retrieve data based on the hook argument and whether cached data exists by default\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\n * - Caches multiple pages worth of responses, and provides methods to trigger more page fetches forwards and backwards\n * - Accepts polling/re-fetching options to trigger automatic re-fetches when the corresponding criteria is met\n */\nexport type UseInfiniteQuerySubscription<D extends InfiniteQueryDefinition<any, any, any, any, any>> = (\n arg: Signal<QueryArgFrom<D> | SkipToken> | (() => QueryArgFrom<D> | SkipToken) | QueryArgFrom<D> | SkipToken,\n options?:\n | UseInfiniteQuerySubscriptionOptions<D>\n | Signal<UseInfiniteQuerySubscriptionOptions<D>>\n | (() => UseInfiniteQuerySubscriptionOptions<D>),\n) => UseInfiniteQuerySubscriptionResult<D>;\n\nexport type UseInfiniteQueryHookResult<\n D extends InfiniteQueryDefinition<any, any, any, any, any>,\n R = UseInfiniteQueryStateDefaultResult<D>,\n> = UseInfiniteQueryStateResult<D, R> & Pick<UseInfiniteQuerySubscriptionResult<D>, 'refetch'>;\n\nexport type UseInfiniteQueryStateOptions<\n D extends InfiniteQueryDefinition<any, any, any, any, any>,\n R extends Record<string, any>,\n> = {\n /**\n * Prevents a query from automatically running.\n *\n * @remarks\n * When skip is true:\n *\n * - **If the query has cached data:**\n * * The cached data **will not be used** on the initial load, and will ignore updates from any identical query until the `skip` condition is removed\n * * The query will have a status of `uninitialized`\n * * If `skip: false` is set after skipping the initial load, the cached result will be used\n * - **If the query does not have cached data:**\n * * The query will have a status of `uninitialized`\n * * The query will not exist in the state when viewed with the dev tools\n * * The query will not automatically fetch on mount\n * * The query will not automatically run when additional components with the same query are added that do run\n *\n * @example\n * ```ts\n * // codeblock-meta title=\"Skip example\"\n * name = input.required<string>()\n * skipCall = input(true);\n *\n * getPokemonByNameQuery = useGetPokemonByNameQuery(name, () => ({\n * skip: this.skipCall(),\n * }));\n * ```\n */\n skip?: boolean;\n /**\n * `selectFromResult` allows you to get a specific segment from a query result in a performant manner.\n * When using this feature, the component will not rerender unless the underlying data of the selected item has changed.\n * If the selected item is one element in a larger collection, it will disregard changes to elements in the same collection.\n *\n * @example\n * ```ts\n * // codeblock-meta title=\"Using selectFromResult to extract a single result\"\n * post = api.useGetPostsQuery(undefined, {\n * selectFromResult: ({ data }) => ({ post: data?.find((post) => post.id === id) }),\n * });\n * ```\n */\n selectFromResult?: InfiniteQueryStateSelector<R, D>;\n};\n\nexport type UseInfiniteQueryStateResult<_ extends InfiniteQueryDefinition<any, any, any, any, any>, R> = DeepSignal<\n TSHelpersNoInfer<R>\n>;\n\nexport type UseInfiniteQueryStateBaseResult<D extends InfiniteQueryDefinition<any, any, any, any, any>> =\n InfiniteQuerySubState<D> & {\n /**\n * Where `data` tries to hold data as much as possible, also re-using\n * data from the last arguments passed into the hook, this property\n * will always contain the received data from the query, for the current query arguments.\n */\n currentData?: InfiniteData<ResultTypeFrom<D>, PageParamFrom<D>>;\n /**\n * Query has not started yet.\n */\n isUninitialized: false;\n /**\n * Query is currently loading for the first time. No data yet.\n */\n isLoading: false;\n /**\n * Query is currently fetching, but might have data from an earlier request.\n */\n isFetching: false;\n /**\n * Query has data from a successful load.\n */\n isSuccess: false;\n /**\n * Query is currently in \"error\" state.\n */\n isError: false;\n hasNextPage: false;\n hasPreviousPage: false;\n isFetchingNextPage: false;\n isFetchingPreviousPage: false;\n };\n\nexport type UseInfiniteQueryStateDefaultResult<D extends InfiniteQueryDefinition<any, any, any, any, any>> =\n TSHelpersId<\n | TSHelpersOverride<\n Extract<UseInfiniteQueryStateBaseResult<D>, { status: QueryStatus.uninitialized }>,\n { isUninitialized: true }\n >\n | TSHelpersOverride<\n UseInfiniteQueryStateBaseResult<D>,\n | { isLoading: true; isFetching: boolean; data: undefined }\n | ({\n isSuccess: true;\n isFetching: true;\n error: undefined;\n } & Required<Pick<UseInfiniteQueryStateBaseResult<D>, 'data' | 'fulfilledTimeStamp'>>)\n | ({\n isSuccess: true;\n isFetching: false;\n error: undefined;\n } & Required<Pick<UseInfiniteQueryStateBaseResult<D>, 'data' | 'fulfilledTimeStamp' | 'currentData'>>)\n | ({ isError: true } & Required<Pick<UseInfiniteQueryStateBaseResult<D>, 'error'>>)\n >\n > & {\n /**\n * @deprecated Included for completeness, but discouraged.\n * Please use the `isLoading`, `isFetching`, `isSuccess`, `isError`\n * and `isUninitialized` flags instead\n */\n status: QueryStatus;\n };\n\nexport type MutationStateSelector<R extends Record<string, any>, D extends MutationDefinition<any, any, any, any>> = (\n state: MutationResultSelectorResult<D>,\n) => R;\n\nexport type UseMutationStateOptions<D extends MutationDefinition<any, any, any, any>, R extends Record<string, any>> = {\n selectFromResult?: MutationStateSelector<R, D>;\n fixedCacheKey?: string;\n};\n\nexport type UseMutationStateResult<D extends MutationDefinition<any, any, any, any>, R> = SignalsMap<\n TSHelpersNoInfer<R>\n> & {\n originalArgs: Signal<QueryArgFrom<D> | undefined>;\n /**\n * Resets the hook state to its initial `uninitialized` state.\n * This will also remove the last result from the cache.\n */\n reset: () => void;\n};\n\n/**\n * Helper type to manually type the result\n * of the `useMutation` hook in userland code.\n */\nexport type TypedUseMutationResult<\n ResultType,\n QueryArg,\n BaseQuery extends BaseQueryFn,\n R = MutationResultSelectorResult<MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>>,\n> = UseMutationStateResult<MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>, R>;\n\n/**\n * A hook that lets you trigger an update request for a given endpoint, and subscribes the component\n * to read the request status from the Redux store. The component will re-render as the loading status changes.\n *\n * #### Features\n *\n * - Manual control over firing a request to alter data on the server or possibly invalidate the cache\n * - 'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts\n * - Returns the latest request status and cached data from the Redux store\n * - Re-renders as the request status changes and data becomes available\n */\nexport type UseMutation<D extends MutationDefinition<any, any, any, any>> = <\n R extends Record<string, any> = MutationResultSelectorResult<D>,\n>(\n options?: UseMutationStateOptions<D, R>,\n) => MutationTrigger<D> & UseMutationStateResult<D, R>;\n\nexport type TypedUseMutation<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = UseMutation<\n MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>\n>;\n\nexport type MutationTrigger<D extends MutationDefinition<any, any, any, any>> = {\n /**\n * Triggers the mutation and returns a Promise.\n * @remarks\n * If you need to access the error or success payload immediately after a mutation, you can chain .unwrap().\n *\n * @example\n * ```ts\n * // codeblock-meta title=\"Using .unwrap with async await\"\n * try {\n * const payload = await this.addPostMutation({ id: 1, name: 'Example' }).unwrap();\n * console.log('fulfilled', payload)\n * } catch (error) {\n * console.error('rejected', error);\n * }\n * ```\n *\n * @example\n * ```ts\n * // codeblock-meta title=\"Using .unwrap with async await\"\n * this.deletePostMutation(+this.route.snapshot.params.id)\n * .unwrap()\n * .then(() => this.router.navigate(['/posts']))\n * .catch(() => console.error('Error deleting Post'));\n * ```\n */\n (arg: QueryArgFrom<D>): MutationActionCreatorResult<D>;\n};\n\nexport type TypedMutationTrigger<ResultType, QueryArg, BaseQuery extends BaseQueryFn> = MutationTrigger<\n MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>\n>;\n\nexport type GenericPrefetchThunk = (\n endpointName: any,\n arg: any,\n options: PrefetchOptions,\n) => ThunkAction<void, any, any, UnknownAction>;\n\nexport enum DefinitionType {\n query = 'query',\n mutation = 'mutation',\n infinitequery = 'infinitequery',\n}\n\nexport function isQueryDefinition(e: EndpointDefinition<any, any, any, any>): e is QueryDefinition<any, any, any, any> {\n return e.type === DefinitionType.query;\n}\n\nexport function isMutationDefinition(\n e: EndpointDefinition<any, any, any, any>,\n): e is MutationDefinition<any, any, any, any> {\n return e.type === DefinitionType.mutation;\n}\n\nexport function isInfiniteQueryDefinition(\n e: EndpointDefinition<any, any, any, any>,\n): e is InfiniteQueryDefinition<any, any, any, any, any> {\n return e.type === DefinitionType.infinitequery;\n}\n\nexport type Subscribers = { [requestId: string]: SubscriptionOptions };\n\nexport type SubscriptionState = {\n [queryCacheKey: string]: Subscribers | undefined;\n};\n\nexport interface SubscriptionSelectors {\n getSubscriptions: () => SubscriptionState;\n getSubscriptionCount: (queryCacheKey: string) => number;\n isRequestSubscribed: (queryCacheKey: string, requestId: string) => boolean;\n}\n","import { type Signal, computed } from '@angular/core';\nimport { type EndpointDefinition, type SerializeQueryArgs } from '@reduxjs/toolkit/query';\n\nexport function useStableQueryArgs<T>(\n queryArgs: Signal<T>,\n serialize: SerializeQueryArgs<any>,\n endpointDefinition: EndpointDefinition<any, any, any, any>,\n endpointName: string,\n) {\n const incoming = computed(\n () => {\n const incomingArgs = queryArgs();\n return {\n queryArgs: incomingArgs,\n serialized:\n typeof incomingArgs == 'object'\n ? serialize({ queryArgs: incomingArgs, endpointDefinition, endpointName })\n : incomingArgs,\n };\n },\n { equal: (a, b) => a.serialized === b.serialized },\n );\n return computed(() => incoming().queryArgs);\n}\n","export function capitalize(str: string) {\n return str.replace(str[0], str[0].toUpperCase());\n}\n","import { type Signal, effect, signal, untracked } from '@angular/core';\n\nexport function toLazySignal<T>(inputSignal: Signal<T> | (() => T), { initialValue }: { initialValue: T }): Signal<T> {\n const s = signal<T>(initialValue as T);\n\n effect(() => {\n const input = inputSignal();\n untracked(() => s.set(input));\n });\n\n return s.asReadonly();\n}\n","function is(x: unknown, y: unknown) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nexport function shallowEqual(objA: any, objB: any): boolean {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n","/**\n * The code in this file is adapted from TanStack/query\n *\n * TanStack/query is an open-source project licensed under the MIT license.\n *\n * For more information about the original code, see\n * https://github.com/TanStack/query\n */\nimport { type Signal as NgSignal, computed, untracked } from '@angular/core';\n\n// An extended Signal type that enables the correct typing\n// of nested signals with the `name` or `length` key.\nexport interface Signal<T> extends NgSignal<T> {\n name: unknown;\n length: unknown;\n}\n\nexport type SignalsMap<T> = Required<{\n [K in keyof T]: T[K] extends Function ? T[K] : Signal<T[K]>;\n}>;\n\nexport type DeepSignal<T> = Signal<T> & SignalsMap<T>;\n\n/**\n * Exposes fields of an object passed via an Angular `Signal` as `Computed` signals.\n *\n * Functions on the object are passed through as-is.\n *\n * @param signal - `Signal` that must return an object.\n *\n */\nexport function signalProxy<T extends Record<string | symbol, any>>(signal: Signal<T>): SignalsMap<T> {\n const internalState = {} as SignalsMap<T>;\n\n return new Proxy<SignalsMap<T>>(internalState, {\n get(target, prop) {\n // first check if we have it in our internal state and return it\n const computedField = target[prop];\n if (computedField) return computedField;\n\n // then, check if it's a function on the resultState and return it\n const targetField = untracked(signal)[prop];\n if (typeof targetField === 'function') return targetField;\n\n // finally, create a computed field, store it and return it\n // @ts-expect-error bypass\n return (target[prop] = computed(() => signal()[prop]));\n },\n has(_, prop) {\n return !!untracked(signal)[prop];\n },\n ownKeys() {\n return Reflect.ownKeys(untracked(signal));\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n });\n}\n\nexport function toDeepSignal<T extends Record<string | symbol, any>>(signal: Signal<T>): DeepSignal<T> {\n const deepSignal = signalProxy(signal);\n return Object.assign(signal, deepSignal);\n}\n","export type NoInfer<T> = [T][T extends any ? 0 : never];\n\nexport function safeAssign<T extends object>(target: T, ...args: Array<Partial<NoInfer<T>>>): T {\n return Object.assign(target, ...args);\n}\n","import { DestroyRef, computed, effect, inject, isDevMode, signal, untracked } from '@angular/core';\nimport { type Action, type Selector } from '@reduxjs/toolkit';\nimport {\n type Api,\n type ApiContext,\n type ApiEndpointMutation,\n type ApiEndpointQuery,\n type CoreModule,\n type EndpointDefinitions,\n type InfiniteQueryActionCreatorResult,\n type InfiniteQueryResultSelectorResult,\n type MutationActionCreatorResult,\n type MutationDefinition,\n type PrefetchOptions,\n type QueryActionCreatorResult,\n type QueryCacheKey,\n type QueryDefinition,\n type QueryKeys,\n type QueryResultSelectorResult,\n QueryStatus,\n type RootState,\