(record: any)
| 70 | } & { id: string } |
| 71 | |
| 72 | export 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 |
| 80 | export type MapBaseColumnType<TOutput> = { |
no outgoing calls
no test coverage detected