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.75k stars 2.92k forks source link

chore(query-core): define queryCache notify method's return type #8191

Closed haeunnam closed 1 month ago

haeunnam commented 1 month ago

I noticed that all the methods in QueryCache have defined return types, except for the notify method, so I added a return type for it.

nx-cloud[bot] commented 1 month ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1cf9d14cf2ac6ec26226ecafcaadc2c8a71d92eb. 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 2 targets - [`nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build --parallel=3`](https://cloud.nx.app/runs/vZaP9skyqV?utm_source=pull-request&utm_medium=comment) - [`nx run-many --target=build --exclude=examples/** --exclude=integrations/**`](https://cloud.nx.app/runs/HQU7CkY5Ir?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/24e02de6-b0f7-483f-b89c-06154dc0f0d7) - [@tanstack/query-example-angular-infinite-query-with-max-pages](https://pkg.pr.new/template/3785d6b6-b74f-42a2-ae16-aebd5d0014b6) - [@tanstack/query-example-angular-pagination](https://pkg.pr.new/template/7cadf5ed-7683-4479-b141-838bf0258b86) - [@tanstack/query-example-angular-router](https://pkg.pr.new/template/2e7ddfde-b681-40d2-a150-4fe6415bde26) - [@tanstack/query-example-angular-simple](https://pkg.pr.new/template/55fb25a0-ae18-42e7-adc3-60ee5514ce4d) - [@tanstack/query-example-angular-rxjs](https://pkg.pr.new/template/1e9c2c06-23d7-487b-8c56-6a608502e102) - [@tanstack/query-example-solid-astro](https://pkg.pr.new/template/303d3b6b-7861-417a-87ea-c1d0fd417084) - [@tanstack/query-example-solid-basic](https://pkg.pr.new/template/7ef4d5d3-7ea0-4cc5-8b34-5a090b5f773f) - [@tanstack/query-example-solid-basic-graphql-request](https://pkg.pr.new/template/a34ddbf9-c6d9-4771-ba09-4e185c88d277) - [@tanstack/query-example-solid-default-query-function](https://pkg.pr.new/template/f53274fc-de6a-4310-a56d-7b6eeea12c37) - [@tanstack/query-example-solid-start-streaming](https://pkg.pr.new/template/c8403c84-0b0a-47e5-8c1f-03741dec4992) - [@tanstack/query-example-solid-simple](https://pkg.pr.new/template/6313c24d-87a5-48b3-835f-25a62777a72c) - [@tanstack/query-example-react-auto-refetching](https://pkg.pr.new/template/d4c85e7b-f755-4241-8e58-d06e1a70c65d) - [@tanstack/query-example-react-algolia](https://pkg.pr.new/template/a48b6395-7670-4625-b513-ad9af21218d4) - [@tanstack/query-example-react-basic-graphql-request](https://pkg.pr.new/template/51af973a-7086-4b3d-a06c-32059aa762f0) - [@tanstack/query-example-react-basic](https://pkg.pr.new/template/3b4fe92c-bf43-48ec-8ea9-cfc31a7528fc) - [@tanstack/query-example-react-devtools-panel](https://pkg.pr.new/template/afd4ca05-233e-408b-b150-9df975d5292e) - [@tanstack/query-example-react-default-query-function](https://pkg.pr.new/template/05b64f0d-cf62-4d02-8e77-f21fae76f924) - [@tanstack/query-example-react-load-more-infinite-scroll](https://pkg.pr.new/template/023e7134-f622-439a-b2f7-77269ce3412d) - [@tanstack/query-example-react-nextjs-app-prefetching](https://pkg.pr.new/template/292227c2-8127-4cb0-802a-157ef45dec3a) - [@tanstack/query-example-react-nextjs](https://pkg.pr.new/template/a33f97be-02e4-4929-b30c-9c0b2788713d) - [@tanstack/query-example-nextjs-suspense-streaming](https://pkg.pr.new/template/9d37cf8e-8e09-458d-9e28-b9ff03dde68a) - [@tanstack/query-example-react-offline](https://pkg.pr.new/template/e475dd92-6003-4c0a-9a81-2ee186834984) - [@tanstack/query-example-react-optimistic-updates-cache](https://pkg.pr.new/template/e6e81141-5df6-47ba-afad-8fced80c1d42) - [@tanstack/query-example-react-optimistic-updates-ui](https://pkg.pr.new/template/04624b53-ac9c-49a7-b048-12a3a48db632) - [@tanstack/query-example-react-pagination](https://pkg.pr.new/template/22c044f6-5d3d-4eef-9409-77e4f7dd3cfa) - [@tanstack/query-example-react-playground](https://pkg.pr.new/template/38c78099-1115-4754-87cd-501807108570) - [@tanstack/query-example-react-prefetching](https://pkg.pr.new/template/5c5d02f2-9cd6-45e8-ac5c-e65d3d5ed0d6) - [@tanstack/query-example-react-react-native](https://pkg.pr.new/template/38a35671-a6bc-4d10-82b6-5b79c73e2960) - [@tanstack/query-example-react-router](https://pkg.pr.new/template/ea41eb6a-ea79-4fd4-abfa-714bdcc1891c) - [@tanstack/query-example-react-rick-morty](https://pkg.pr.new/template/7293bc21-0479-4cd0-93d1-87912d6ab70c) - [@tanstack/query-example-react-shadow-dom](https://pkg.pr.new/template/a458e818-36a5-44a7-b2d5-deab53dd0800) - [@tanstack/query-example-react-simple](https://pkg.pr.new/template/c04f6a61-65b5-4fd2-9986-f1940fe3e606) - [@tanstack/query-example-react-star-wars](https://pkg.pr.new/template/3a93ea32-05aa-4365-a3bf-e10b51f245e2) - [@tanstack/query-example-react-suspense](https://pkg.pr.new/template/c2264398-1c91-4cfc-9e5a-f058dc0e8646) - [@tanstack/query-example-svelte-auto-refetching](https://pkg.pr.new/template/e4cef3c4-637f-450d-be7e-ccc1351e04b5) - [@tanstack/query-example-svelte-basic](https://pkg.pr.new/template/bb1779eb-131d-4f32-93d3-a0adb5836c32) - [@tanstack/query-example-svelte-load-more-infinite-scroll](https://pkg.pr.new/template/b1dd1d93-9fa6-44ec-ac86-255a533bc018) - [@tanstack/query-example-svelte-optimistic-updates](https://pkg.pr.new/template/ea5b62fb-8759-4e51-8020-f95f281a8694) - [@tanstack/query-example-svelte-playground](https://pkg.pr.new/template/161f4dbc-0943-4057-849a-b0d7c7b6b5a1) - [@tanstack/query-example-svelte-simple](https://pkg.pr.new/template/7b2cb728-bac9-4a77-b332-f8336ce8bae2) - [@tanstack/query-example-svelte-ssr](https://pkg.pr.new/template/711c382a-cc0b-48f9-99c2-506ea818926d) - [@tanstack/query-example-svelte-star-wars](https://pkg.pr.new/template/c05777a9-942d-480d-aeb4-f152d0b344e0) - [@tanstack/query-example-vue-2.6-basic](https://pkg.pr.new/template/644775b1-490f-49da-bb86-83d1a84e132d) - [@tanstack/query-example-vue-2.7-basic](https://pkg.pr.new/template/3e21f17c-095d-48bd-8d91-d0a71bf61dc2) - [@tanstack/query-example-vue-basic](https://pkg.pr.new/template/57a17a93-89b9-4296-9901-f1f79ea04ee5) - [@tanstack/query-example-vue-dependent-queries](https://pkg.pr.new/template/f0e23d54-6769-4bb8-93ae-b612383c00b3) - [@tanstack/query-example-vue-nuxt3](https://pkg.pr.new/template/7df85842-d8da-4197-a20c-55d1f7147d7a) - [@tanstack/query-example-vue-persister](https://pkg.pr.new/template/b2501ff7-e211-4a17-a300-2c3fc514dcb2) - [@tanstack/query-example-vue-simple](https://pkg.pr.new/template/c71cd88f-87dc-41c4-8262-9654092e3148) - [@tanstack/query-example-react-infinite-query-with-max-pages](https://pkg.pr.new/template/b74ad630-bbec-4817-bb03-19f2d279bb88)

@tanstack/angular-query-devtools-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/angular-query-experimental

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query-devtools

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

@tanstack/react-query

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/vue-query

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query-devtools

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

commit: 1cf9d14

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 62.09%. Comparing base (d3e2a8a) to head (1cf9d14). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/TanStack/query/pull/8191/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/8191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) ```diff @@ Coverage Diff @@ ## main #8191 +/- ## ========================================= + Coverage 0 62.09% +62.09% ========================================= Files 0 136 +136 Lines 0 4757 +4757 Branches 0 1335 +1335 ========================================= + Hits 0 2954 +2954 - Misses 0 1563 +1563 - Partials 0 240 +240 ``` | [Components](https://app.codecov.io/gh/TanStack/query/pull/8191/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/8191/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/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `86.58% <ø> (∅)` | | | [@tanstack/eslint-plugin-query](https://app.codecov.io/gh/TanStack/query/pull/8191/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/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `43.85% <ø> (∅)` | | | [@tanstack/query-broadcast-client-experimental](https://app.codecov.io/gh/TanStack/query/pull/8191/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/8191/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/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `93.19% <100.00%> (∅)` | | | [@tanstack/query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `4.79% <ø> (∅)` | | | [@tanstack/query-persist-client-core](https://app.codecov.io/gh/TanStack/query/pull/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `57.73% <ø> (∅)` | | | [@tanstack/query-sync-storage-persister](https://app.codecov.io/gh/TanStack/query/pull/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `82.50% <ø> (∅)` | | | [@tanstack/react-query](https://app.codecov.io/gh/TanStack/query/pull/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `93.10% <ø> (∅)` | | | [@tanstack/react-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8191/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/8191/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/8191/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/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `78.20% <ø> (∅)` | | | [@tanstack/solid-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8191/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/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `100.00% <ø> (∅)` | | | [@tanstack/svelte-query](https://app.codecov.io/gh/TanStack/query/pull/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `87.33% <ø> (∅)` | | | [@tanstack/svelte-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8191/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/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `100.00% <ø> (∅)` | | | [@tanstack/vue-query](https://app.codecov.io/gh/TanStack/query/pull/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `71.45% <ø> (∅)` | | | [@tanstack/vue-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8191/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | |