(cursor: Cursor)
| 17 | } |
| 18 | |
| 19 | export function decodeTimeCursor(cursor: Cursor): TimeCursor | null { |
| 20 | if (!cursor) return null |
| 21 | try { |
| 22 | const parsed = JSON.parse(cursor) as TimeCursor |
| 23 | if (typeof parsed?.ts !== 'string' || typeof parsed?.id !== 'string') return null |
| 24 | return parsed |
| 25 | } catch { |
| 26 | return null |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Builds a strict-greater-than predicate over a `(timestampCol, idCol)` pair. |