Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

constants.ts

15 lines536 Bytes

1export const mutationFunctions = ['useMutation'] as const
2​
3/**
4 * The names of the functions whose options the `mutation-property-order` rule checks.
5 */
6export type MutationFunctions = (typeof mutationFunctions)[number]
7​
8export const checkedProperties = ['onMutate', 'onError', 'onSettled'] as const
9​
10/**
11 * The option properties whose order the `mutation-property-order` rule checks.
12 */
13export type MutationProperties = (typeof checkedProperties)[number]
14​
15export const sortRules = [[['onMutate'], ['onError', 'onSettled']]] as const