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

Function asPowerSyncRecord

packages/powersync-db-collection/src/helpers.ts:72–77  ·  view source on GitHub ↗
(record: any)

Source from the content-addressed store, hash-verified

70} & { id: string }
71
72export function asPowerSyncRecord(record: any): PowerSyncRecord {
73 if (typeof record.id !== `string`) {
74 throw new Error(`Record must have a string id field`)
75 }
76 return record as PowerSyncRecord
77}
78
79// Helper type to ensure the keys of TOutput match the Table columns
80export type MapBaseColumnType<TOutput> = {

Callers 3

handleUpdateMethod · 0.90
handleDeleteMethod · 0.90
getKeyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected