EdgeAIG's picture
download
raw
1.02 kB
/**
* Interfaces for describing changes to a value as patches. A
* `Differ<T, Patch>` compares an old and new value, creates a patch for the
* difference, combines patches in order, and applies a patch to an old value to
* produce an updated value.
*
* @since 4.0.0
*/
/**
* Describes how to compute, combine, and apply patches for values of type `T`.
*
* **When to use**
*
* Use to model patch-based updates for a value type when callers need to
* compute a patch from two values, combine patches, and apply a patch later.
*
* **Details**
*
* A `Differ` provides an empty patch, computes the patch between two values,
* combines patches, and applies a patch to an old value to produce an updated
* value.
*
* @category models
* @since 2.0.0
*/
export interface Differ<in out T, in out Patch> {
readonly empty: Patch;
diff(oldValue: T, newValue: T): Patch;
combine(first: Patch, second: Patch): Patch;
patch(oldValue: T, patch: Patch): T;
}
//# sourceMappingURL=Differ.d.ts.map

Xet Storage Details

Size:
1.02 kB
·
Xet hash:
1e6a428d54f4dd7a93b566aa2552c17d9a485d1a8db2bd6ba7f6d6e48b375f92

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.