1// rebuilt from linear.app: the sync engine
2export function applyDeltas(store, frame) {
3 for (const d of frame.actions) {
4 if (d.syncId <= store.lastSyncId) continue;
5 store.records.set(d.id, d.data);
6 store.lastSyncId = d.syncId;
7 }
8 return socket.send({ ack: store.lastSyncId });
9}