UNPKG

diffable-objects

Version:

A package for dynamic state tracking for Cloudflare's Durable Objects using SQLite

13 lines (12 loc) 357 B
import { type IAtomicChange } from "json-diff-ts"; type Snapshot = { type: "snapshot"; value: unknown; }; type Change = { type: "change"; atomicChange: IAtomicChange; }; export type TrackerActions = [Snapshot, ...Change[]] | Change[]; export declare function replay<T extends object>(actions: TrackerActions, initialValue: T): T; export {};