type TreeFingerprintNode = { id: string | number; nodes?: TreeFingerprintNode[]; [key: string]: unknown; }; type TreeFingerprint = { id: string | number; keys: Record; children: TreeFingerprint[]; }; /** Cheap per-node snapshot of a tree (shallow, `Object.is`-compared fields). */ export function fingerprintTree( list: readonly T[], ): TreeFingerprint[]; /** Whether `list` still matches a snapshot taken by `fingerprintTree`. */ export function matchesFingerprint( fingerprint: TreeFingerprint[], list: readonly T[], ): boolean;