--- 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 `TQueryFnData` #### TError `TError` = `Error` #### TData `TData` = `InfiniteData`\<`TQueryFnData`, `unknown`\> #### TQueryKey `TQueryKey` *extends* readonly `unknown`[] = readonly `unknown`[] #### TPageParam `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. ## 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 `TQueryFnData` #### TError `TError` = `Error` #### TData `TData` = `InfiniteData`\<`TQueryFnData`, `unknown`\> #### TQueryKey `TQueryKey` *extends* readonly `unknown`[] = readonly `unknown`[] #### TPageParam `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. ## 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 `TQueryFnData` #### TError `TError` = `Error` #### TData `TData` = `InfiniteData`\<`TQueryFnData`, `unknown`\> #### TQueryKey `TQueryKey` *extends* readonly `unknown`[] = readonly `unknown`[] #### TPageParam `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.