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
40.54k stars 2.73k forks source link

fix(types): make TVariables default to unknown on Mutation #7433

Closed TkDodo closed 1 month ago

TkDodo commented 1 month ago

we only need void as the default for MutationOptions so that we can fire mutations with no parameters without passing undefined to them explicitly. For reading mutations and mutationState, unknown is better.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **query** | ⬜️ Ignored ([Inspect](https://vercel.com/tanstack/query/3wSqrLTFu1RZttp2qD5Qj2fab1Yt)) | [Visit Preview](https://query-git-feature-default-mutation-type-parameters-tanstack.vercel.app) | | May 15, 2024 2:16pm |
nx-cloud[bot] commented 1 month ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 0cd503febb919fb7fc61345d475291002affe88d. 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:format,test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build,test:attw --parallel=3`](https://cloud.nx.app/runs/MgqoPBfAGu?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

codesandbox-ci[bot] commented 1 month ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0cd503febb919fb7fc61345d475291002affe88d:

Sandbox Source
@tanstack/query-example-angular-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration