TanStack / query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
https://tanstack.com/query
MIT License
42.67k stars 2.92k forks source link

test(react-query): type test usePrefetchInfiniteQuery correctly #8223

Closed manudeli closed 3 weeks ago

nx-cloud[bot] commented 1 month ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 7cf62d095206b640ccd8af44715ac36507d4451a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target - [`nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build --parallel=3`](https://cloud.nx.app/runs/OH9BC8xLst?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

More templates

- [@tanstack/query-example-angular-basic](https://pkg.pr.new/template/0e05babd-e23b-4a7d-bd8c-b94c27d9a924) - [@tanstack/query-example-angular-infinite-query-with-max-pages](https://pkg.pr.new/template/5a237d00-3080-4202-ab27-67f2004dcf93) - [@tanstack/query-example-angular-query-options-from-a-service](https://pkg.pr.new/template/20ba2d6d-85c5-44d6-9703-a59c5b641b86) - [@tanstack/query-example-angular-router](https://pkg.pr.new/template/37684cf0-c160-4155-ace2-01e590f669b8) - [@tanstack/query-example-angular-pagination](https://pkg.pr.new/template/03e414b6-ec5b-46aa-b568-651ed5eab16c) - [@tanstack/query-example-angular-rxjs](https://pkg.pr.new/template/d3f1a43f-bb12-425c-9684-dffe7e83bfb6) - [@tanstack/query-example-angular-simple](https://pkg.pr.new/template/c91e6167-5de0-4bed-87c8-e22afc43b845) - [@tanstack/query-example-react-algolia](https://pkg.pr.new/template/3b09bd0b-d4b1-4726-ba29-b04dfb9bc238) - [@tanstack/query-example-react-auto-refetching](https://pkg.pr.new/template/55e88879-b82c-4548-80c2-6eccca861659) - [@tanstack/query-example-react-basic](https://pkg.pr.new/template/d0760dde-e841-4e3b-a252-9641bd8be452) - [@tanstack/query-example-react-basic-graphql-request](https://pkg.pr.new/template/99c7b9f4-8852-4731-9202-a38d88cee19b) - [@tanstack/query-example-react-default-query-function](https://pkg.pr.new/template/6c7d8d92-c8ba-4340-9c4d-66516881475b) - [@tanstack/query-example-react-devtools-panel](https://pkg.pr.new/template/f7a4d962-3552-4ae2-8402-fdcd2c46a8cb) - [@tanstack/query-example-react-load-more-infinite-scroll](https://pkg.pr.new/template/e856981b-43dc-498d-8b9e-e0d65ff3dcd0) - [@tanstack/query-example-react-infinite-query-with-max-pages](https://pkg.pr.new/template/8cbb7d5e-39e8-40d5-b5f0-d29447603682) - [@tanstack/query-example-react-nextjs](https://pkg.pr.new/template/7a112492-0825-4a95-a71d-645f0082e881) - [@tanstack/query-example-react-nextjs-app-prefetching](https://pkg.pr.new/template/940d1fd4-7ba5-42f8-86a3-c8ac83ebd7ed) - [@tanstack/query-example-nextjs-suspense-streaming](https://pkg.pr.new/template/dcad6b92-ff02-4cd1-828b-6359345dc20d) - [@tanstack/query-example-react-offline](https://pkg.pr.new/template/dce2a856-1824-4e53-bd7d-359a87285117) - [@tanstack/query-example-react-optimistic-updates-cache](https://pkg.pr.new/template/6677feb0-fd99-4eda-8619-c1d84487b8b5) - [@tanstack/query-example-react-optimistic-updates-ui](https://pkg.pr.new/template/5e3932e9-0ea8-4cd0-ae3b-3d925b298b09) - [@tanstack/query-example-react-pagination](https://pkg.pr.new/template/1350b732-c544-4d68-9941-bf9b9879bcb4) - [@tanstack/query-example-react-playground](https://pkg.pr.new/template/587b211d-69fb-4623-bad8-977f104c2c5b) - [@tanstack/query-example-react-prefetching](https://pkg.pr.new/template/07a95d53-dba7-407e-8e61-1edf6d086658) - [@tanstack/query-example-react-react-native](https://pkg.pr.new/template/8f981f27-92ec-4941-98d0-aa7e32834b5c) - [@tanstack/query-example-react-router](https://pkg.pr.new/template/e9662c66-161a-4314-8317-eca78c917601) - [@tanstack/query-example-react-rick-morty](https://pkg.pr.new/template/3f5bd27a-9feb-4a85-ac3c-5d9250fd35bf) - [@tanstack/query-example-react-shadow-dom](https://pkg.pr.new/template/54ce3560-0c6f-4b84-a118-5a15ade1eaed) - [@tanstack/query-example-react-simple](https://pkg.pr.new/template/a6d4fd9b-b6a6-4a06-a635-fd3509eaf864) - [@tanstack/query-example-react-star-wars](https://pkg.pr.new/template/637b0f25-6a16-471c-9181-c76c8328d8c0) - [@tanstack/query-example-react-suspense](https://pkg.pr.new/template/73fde3bb-6efb-47ba-a18f-c46448a3f6d0) - [@tanstack/query-example-solid-astro](https://pkg.pr.new/template/dfb456f6-4617-4efd-886f-40c7b0aea009) - [@tanstack/query-example-solid-basic](https://pkg.pr.new/template/50a55296-51b4-4075-aedd-8390ed0b023e) - [@tanstack/query-example-solid-basic-graphql-request](https://pkg.pr.new/template/4be07879-1d0a-4e0e-81c7-601d32acb677) - [@tanstack/query-example-solid-simple](https://pkg.pr.new/template/58499aa9-3f01-44a8-8e4b-67fef2b46701) - [@tanstack/query-example-solid-default-query-function](https://pkg.pr.new/template/984c1f30-f96c-4234-864e-82049efc7420) - [@tanstack/query-example-solid-start-streaming](https://pkg.pr.new/template/aa064372-920a-45b5-babe-41f874fed3f7) - [@tanstack/query-example-svelte-auto-refetching](https://pkg.pr.new/template/ab9bf22e-6461-48e2-8113-646b268cf1ea) - [@tanstack/query-example-svelte-basic](https://pkg.pr.new/template/8221cba7-c5c2-4c20-84cf-c8492010b5b9) - [@tanstack/query-example-svelte-load-more-infinite-scroll](https://pkg.pr.new/template/3bf499cd-b83f-4d64-9f32-79e273f77040) - [@tanstack/query-example-svelte-optimistic-updates](https://pkg.pr.new/template/5db913b5-9219-427c-894f-69c950fa4e8c) - [@tanstack/query-example-svelte-playground](https://pkg.pr.new/template/738d7a06-69c2-45be-b35b-2b35a44b0c6d) - [@tanstack/query-example-svelte-simple](https://pkg.pr.new/template/97612832-aa93-4dda-8976-6fd11595f705) - [@tanstack/query-example-svelte-ssr](https://pkg.pr.new/template/ba5af781-919f-46b1-a1ca-7f3166ad73db) - [@tanstack/query-example-vue-2.6-basic](https://pkg.pr.new/template/d7f383de-4cea-4c69-b835-10cfd4e3c39f) - [@tanstack/query-example-svelte-star-wars](https://pkg.pr.new/template/9de6eddb-f6c2-41e7-be75-45c7af821a17) - [@tanstack/query-example-vue-2.7-basic](https://pkg.pr.new/template/8a091042-fa88-4468-a24f-4f37499204f7) - [@tanstack/query-example-vue-basic](https://pkg.pr.new/template/233276c4-2246-47ec-ae1d-907a620cc981) - [@tanstack/query-example-vue-dependent-queries](https://pkg.pr.new/template/e264abca-af28-4ebd-91bc-9d3f9f6d2c6b) - [@tanstack/query-example-vue-nuxt3](https://pkg.pr.new/template/85786d33-edf4-4817-a878-d4dd95022251) - [@tanstack/query-example-vue-persister](https://pkg.pr.new/template/04f4f9ff-974f-43d4-af32-b8c1b687036a) - [@tanstack/query-example-vue-simple](https://pkg.pr.new/template/d5030f71-fae7-4fa0-b07e-8a36ff0f74c9)

@tanstack/angular-query-devtools-experimental

``` pnpm add https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@8223 ```

@tanstack/angular-query-experimental

``` pnpm add https://pkg.pr.new/@tanstack/angular-query-experimental@8223 ```

@tanstack/query-async-storage-persister

``` pnpm add https://pkg.pr.new/@tanstack/query-async-storage-persister@8223 ```

@tanstack/query-broadcast-client-experimental

``` pnpm add https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@8223 ```

@tanstack/eslint-plugin-query

``` pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-query@8223 ```

@tanstack/query-core

``` pnpm add https://pkg.pr.new/@tanstack/query-core@8223 ```

@tanstack/query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/query-devtools@8223 ```

@tanstack/query-persist-client-core

``` pnpm add https://pkg.pr.new/@tanstack/query-persist-client-core@8223 ```

@tanstack/query-sync-storage-persister

``` pnpm add https://pkg.pr.new/@tanstack/query-sync-storage-persister@8223 ```

@tanstack/react-query

``` pnpm add https://pkg.pr.new/@tanstack/react-query@8223 ```

@tanstack/react-query-next-experimental

``` pnpm add https://pkg.pr.new/@tanstack/react-query-next-experimental@8223 ```

@tanstack/react-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/react-query-devtools@8223 ```

@tanstack/react-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/react-query-persist-client@8223 ```

@tanstack/solid-query

``` pnpm add https://pkg.pr.new/@tanstack/solid-query@8223 ```

@tanstack/solid-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/solid-query-devtools@8223 ```

@tanstack/solid-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/solid-query-persist-client@8223 ```

@tanstack/svelte-query

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query@8223 ```

@tanstack/svelte-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query-devtools@8223 ```

@tanstack/svelte-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query-persist-client@8223 ```

@tanstack/vue-query

``` pnpm add https://pkg.pr.new/@tanstack/vue-query@8223 ```

@tanstack/vue-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/vue-query-devtools@8223 ```

commit: 7cf62d0

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.89%. Comparing base (2fe16e5) to head (7cf62d0). Report is 58 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/TanStack/query/pull/8223/graphs/tree.svg?width=650&height=150&src=pr&token=jqEbswkEDQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack)](https://app.codecov.io/gh/TanStack/query/pull/8223?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) ```diff @@ Coverage Diff @@ ## main #8223 +/- ## =========================================== + Coverage 45.41% 81.89% +36.48% =========================================== Files 200 26 -174 Lines 7456 359 -7097 Branches 1696 100 -1596 =========================================== - Hits 3386 294 -3092 + Misses 3694 56 -3638 + Partials 376 9 -367 ``` | [Components](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | Coverage Δ | | |---|---|---| | [@tanstack/angular-query-devtools-experimental](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/angular-query-experimental](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/eslint-plugin-query](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-async-storage-persister](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-broadcast-client-experimental](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-codemods](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-core](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-persist-client-core](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-sync-storage-persister](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/react-query](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `93.15% <100.00%> (+0.02%)` | :arrow_up: | | [@tanstack/react-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `10.00% <ø> (ø)` | | | [@tanstack/react-query-next-experimental](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/react-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `100.00% <ø> (ø)` | | | [@tanstack/solid-query](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/solid-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/solid-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/svelte-query](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/svelte-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/svelte-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/vue-query](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/vue-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8223/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | |