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