Skip to content

Commit 20ef922

Browse files
jinseoITlachlancollinsautofix-ci[bot]
authored
fix(types): remove duplicate Array condition in MutationKey type (#9754)
* fix(types): preserve readonly mutation keys by removing duplicate Array check * Fix duplicate Array condition in MutationKey type * ci: apply automated fixes * fix: make MutationKey type consistent with QueryKey * chore: trigger GitHub UI refresh --------- Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 969801c commit 20ef922

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/chilled-squids-grow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/query-core': patch
3+
---
4+
5+
fix(types): remove duplicate Array condition in MutationKey type

packages/query-core/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ export type InfiniteQueryObserverResult<
10701070
export type MutationKey = Register extends {
10711071
mutationKey: infer TMutationKey
10721072
}
1073-
? TMutationKey extends Array<unknown>
1073+
? TMutationKey extends ReadonlyArray<unknown>
10741074
? TMutationKey
10751075
: TMutationKey extends Array<unknown>
10761076
? TMutationKey

0 commit comments

Comments
 (0)