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

partialMatchKey.md

35 lines684 Bytes

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`.