MCPcopy Create free account
hub / github.com/TanStack/db / normalizeSyncFnResult

Function normalizeSyncFnResult

packages/db-sqlite-persistence-core/src/persisted.ts:715–725  ·  view source on GitHub ↗
(result: void | (() => void) | SyncConfigRes)

Source from the content-addressed store, hash-verified

713}
714
715function normalizeSyncFnResult(result: void | (() => void) | SyncConfigRes) {
716 if (typeof result === `function`) {
717 return { cleanup: result } satisfies SyncConfigRes
718 }
719
720 if (result === undefined) {
721 return {} satisfies SyncConfigRes
722 }
723
724 return result
725}
726
727function isTxCommittedPayload(payload: unknown): payload is TxCommitted {
728 if (!isRecord(payload) || payload.type !== `tx:committed`) {

Callers 1

createWrappedSyncConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected