--- id: infiniteQueryOptions title: infiniteQueryOptions --- # Function: infiniteQueryOptions() Allows to share and re-use infinite query options in a type-safe way. The `queryKey` will be tagged with the type from `queryFn`. ## Param The infinite query options to tag with the type from `queryFn`. ## Call Signature ```ts function infiniteQueryOptions(options): CreateInfiniteQueryOptions & object & object ``` Defined in: [infinite-query-options.ts:88](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/infinite-query-options.ts#L88) Allows to share and re-use infinite query options in a type-safe way. The `queryKey` will be tagged with the type from `queryFn`. ### Type Parameters • **TQueryFnData** • **TError** = `Error` • **TData** = `InfiniteData`\<`TQueryFnData`, `unknown`\> • **TQueryKey** *extends* readonly `unknown`[] = readonly `unknown`[] • **TPageParam** = `unknown` ### Parameters #### options [`DefinedInitialDataInfiniteOptions`](../../type-aliases/definedinitialdatainfiniteoptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> The infinite query options to tag with the type from `queryFn`. ### Returns [`CreateInfiniteQueryOptions`](../../interfaces/createinfinitequeryoptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> & `object` & `object` The tagged infinite query options. The tagged infinite query options. ### Param The infinite query options to tag with the type from `queryFn`. ## Call Signature ```ts function infiniteQueryOptions(options): OmitKeyof, "queryFn"> & object & object ``` Defined in: [infinite-query-options.ts:119](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/infinite-query-options.ts#L119) Allows to share and re-use infinite query options in a type-safe way. The `queryKey` will be tagged with the type from `queryFn`. ### Type Parameters • **TQueryFnData** • **TError** = `Error` • **TData** = `InfiniteData`\<`TQueryFnData`, `unknown`\> • **TQueryKey** *extends* readonly `unknown`[] = readonly `unknown`[] • **TPageParam** = `unknown` ### Parameters #### options [`UnusedSkipTokenInfiniteOptions`](../../type-aliases/unusedskiptokeninfiniteoptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> The infinite query options to tag with the type from `queryFn`. ### Returns `OmitKeyof`\<[`CreateInfiniteQueryOptions`](../../interfaces/createinfinitequeryoptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\>, `"queryFn"`\> & `object` & `object` The tagged infinite query options. The tagged infinite query options. ### Param The infinite query options to tag with the type from `queryFn`. ## Call Signature ```ts function infiniteQueryOptions(options): CreateInfiniteQueryOptions & object & object ``` Defined in: [infinite-query-options.ts:150](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/infinite-query-options.ts#L150) Allows to share and re-use infinite query options in a type-safe way. The `queryKey` will be tagged with the type from `queryFn`. ### Type Parameters • **TQueryFnData** • **TError** = `Error` • **TData** = `InfiniteData`\<`TQueryFnData`, `unknown`\> • **TQueryKey** *extends* readonly `unknown`[] = readonly `unknown`[] • **TPageParam** = `unknown` ### Parameters #### options [`UndefinedInitialDataInfiniteOptions`](../../type-aliases/undefinedinitialdatainfiniteoptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> The infinite query options to tag with the type from `queryFn`. ### Returns [`CreateInfiniteQueryOptions`](../../interfaces/createinfinitequeryoptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> & `object` & `object` The tagged infinite query options. The tagged infinite query options. ### Param The infinite query options to tag with the type from `queryFn`.