Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

constants.ts

25 lines686 Bytes

1export const infiniteQueryFunctions = [
2 'infiniteQueryOptions',
3 'useInfiniteQuery',
4 'useSuspenseInfiniteQuery',
5] as const
6​
7/**
8 * The names of the functions whose options the `infinite-query-property-order` rule checks.
9 */
10export type InfiniteQueryFunctions = (typeof infiniteQueryFunctions)[number]
11​
12export const checkedProperties = [
13 'queryFn',
14 'getPreviousPageParam',
15 'getNextPageParam',
16] as const
17​
18/**
19 * The option properties whose order the `infinite-query-property-order` rule checks.
20 */
21export type InfiniteQueryProperties = (typeof checkedProperties)[number]
22​
23export const sortRules = [
24 [['queryFn'], ['getPreviousPageParam', 'getNextPageParam']],
25] as const