mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
22 lines
691 B
TypeScript
22 lines
691 B
TypeScript
import { NormalizedObject } from '../cache/models/normalized-object.model';
|
|
import { Operation } from 'fast-json-patch/lib/core';
|
|
import { CacheableObject } from '../cache/object-cache.reducer';
|
|
|
|
/**
|
|
* An interface to determine what differs between two
|
|
* NormalizedObjects
|
|
*/
|
|
export interface ChangeAnalyzer<T extends CacheableObject> {
|
|
|
|
/**
|
|
* Compare two objects and return their differences as a
|
|
* JsonPatch Operation Array
|
|
*
|
|
* @param {NormalizedObject} object1
|
|
* The first object to compare
|
|
* @param {NormalizedObject} object2
|
|
* The second object to compare
|
|
*/
|
|
diff(object1: T | NormalizedObject<T>, object2: T | NormalizedObject<T>): Operation[];
|
|
}
|