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

validateSyncPersistenceCapability.md

38 lines926 Bytes

1---
2id: validateSyncPersistenceCapability
3title: validateSyncPersistenceCapability
4---
5​
6```ts
7function validateSyncPersistenceCapability<TKey>(value):
8 | SyncPersistenceCapabilityV1<TKey>
9 | null;
10```
11​
12Defined in: [packages/db/src/sync-persistence.ts:38](https://github.com/TanStack/db/blob/main/packages/db/src/sync-persistence.ts#L38)
13​
14**`Internal`**
15​
16Validates the cross-package structural persistence protocol before a sync
17adapter uses it. Null explicitly means that the collection has no
18persistence capability; undefined means a wrapper dropped the required
19field. Any advertised capability must be complete.
20​
21 This is adapter infrastructure, not an application API.
22​
23## Type Parameters
24​
25### TKey
26​
27`TKey` *extends* `string` \| `number` = `string` \| `number`
28​
29## Parameters
30​
31### value
32​
33`unknown`
34​
35## Returns
36​
37 \| [`SyncPersistenceCapabilityV1`](../type-aliases/SyncPersistenceCapabilityV1.md)\<`TKey`\>
38 \| `null`