Open History to see the last commit
1---
2id: partialMatchKey
3title: partialMatchKey
4---
5β
6```ts
7function partialMatchKey(a: readonly unknown[], b: readonly unknown[]): boolean;
8```
9β
10Defined in: [packages/query-core/src/utils.ts:343](https://github.com/TanStack/query/blob/main/packages/query-core/src/utils.ts#L343)
11β
12Checks if key `b` partially matches with key `a`.
13β
14## Parameters
15β
16### a
17β
18readonly `unknown`[]
19β
20The key to check, e.g. a query's own key.
21β
22### b
23β
24readonly `unknown`[]
25β
26The (partial) key to match against `a`.
27β
28## Returns
29β
30`boolean`
31β
32`true` if every array element or object property in `b` matches the one at the same
33position in `a`.