Open History to see the last commit
1import type { DefaultError, WithRequired } from '@tanstack/query-core'
2import type { UseMutationOptions } from './types'
3β
4export function mutationOptions<
5 TData = unknown,
6 TError = DefaultError,
7 TVariables = void,
8 TScope = unknown,
9>(
10 options: WithRequired<
11 UseMutationOptions<TData, TError, TVariables, TScope>,
12 'mutationKey'
13 >,
14): WithRequired<
15 UseMutationOptions<TData, TError, TVariables, TScope>,
16 'mutationKey'
17>
18export function mutationOptions<
19 TData = unknown,
20 TError = DefaultError,
21 TVariables = void,
22 TScope = unknown,
23>(
24 options: Omit<
25 UseMutationOptions<TData, TError, TVariables, TScope>,
26 'mutationKey'
27 >,
28): Omit<UseMutationOptions<TData, TError, TVariables, TScope>, 'mutationKey'>
29export function mutationOptions<
30 TData = unknown,
31 TError = DefaultError,
32 TVariables = void,
33 TScope = unknown,
34>(
35 options: UseMutationOptions<TData, TError, TVariables, TScope>,
36): UseMutationOptions<TData, TError, TVariables, TScope> {
37 return options
38}