Skip to content

Commit

Permalink
fix(types): remove promise from useMutation (TanStack#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolverineks authored Jul 14, 2020
1 parent 6b0cd19 commit 2d0d215
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ export interface MutationResultBase<TResult, TError = Error> {
isLoading: boolean
isSuccess: boolean
isError: boolean
promise: Promise<TResult>
reset: () => void
}

Expand Down
1 change: 1 addition & 0 deletions types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ function simpleMutation() {
mutationState.isSuccess // $ExpectType boolean
mutationState.reset // $ExpectType () => void
mutationState.status // $ExpectType "idle" | "loading" | "error" | "success"
mutationState.promise // $ExpectError
}

function mutationWithVariables() {
Expand Down

0 comments on commit 2d0d215

Please sign in to comment.