Skip to content

Commit b2c8912

Browse files
committed
Rename to UseSeamMutationVariables
1 parent 7357f81 commit b2c8912

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/seam/use-seam-mutation.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import {
1111

1212
import { NullSeamClientError, useSeamClient } from 'lib/seam/use-seam-client.js'
1313

14-
export type UseSeamMutationParameters<T extends SeamHttpEndpointMutationPaths> =
14+
export type UseSeamMutationVariables<T extends SeamHttpEndpointMutationPaths> =
1515
Parameters<SeamHttpEndpoints[T]>[0]
1616

1717
export type UseSeamMutationResult<T extends SeamHttpEndpointMutationPaths> =
1818
UseMutationResult<
1919
MutationData<T>,
2020
SeamHttpApiError,
21-
UseSeamMutationParameters<T>
21+
UseSeamMutationVariables<T>
2222
>
2323

2424
export function useSeamMutation<T extends SeamHttpEndpointMutationPaths>(
@@ -27,18 +27,18 @@ export function useSeamMutation<T extends SeamHttpEndpointMutationPaths>(
2727
MutationOptions<
2828
MutationData<T>,
2929
SeamHttpApiError,
30-
UseSeamMutationParameters<T>
30+
UseSeamMutationVariables<T>
3131
> = {}
3232
): UseSeamMutationResult<T> {
3333
const { endpointClient: client } = useSeamClient()
3434
return useMutation({
3535
...options,
36-
mutationFn: async (parameters) => {
36+
mutationFn: async (variables) => {
3737
if (client === null) throw new NullSeamClientError()
3838
// Using @ts-expect-error over any is preferred, but not possible here because TypeScript will run out of memory.
3939
// Type assertion is needed here for performance reasons. The types are correct at runtime.
4040
const endpoint = client[endpointPath] as (...args: any) => Promise<any>
41-
return await endpoint(parameters, options)
41+
return await endpoint(variables, options)
4242
},
4343
})
4444
}

0 commit comments

Comments
 (0)