(
options: InfiniteQueryPageParamsOptions<any>,
{ pages, pageParams }: InfiniteData<unknown>,
)
| 130 | } |
| 131 | |
| 132 | function getNextPageParam( |
| 133 | options: InfiniteQueryPageParamsOptions<any>, |
| 134 | { pages, pageParams }: InfiniteData<unknown>, |
| 135 | ): unknown | undefined { |
| 136 | const lastIndex = pages.length - 1 |
| 137 | return pages.length > 0 |
| 138 | ? options.getNextPageParam( |
| 139 | pages[lastIndex], |
| 140 | pages, |
| 141 | pageParams[lastIndex], |
| 142 | pageParams, |
| 143 | ) |
| 144 | : undefined |
| 145 | } |
| 146 | |
| 147 | function getPreviousPageParam( |
| 148 | options: InfiniteQueryPageParamsOptions<any>, |
no outgoing calls
no test coverage detected