mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
add docs, rename classes for clarity
This commit is contained in:
20
src/app/core/data/change-analyzer.ts
Normal file
20
src/app/core/data/change-analyzer.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { NormalizedObject } from '../cache/models/normalized-object.model';
|
||||
import { Operation } from 'fast-json-patch/lib/core';
|
||||
|
||||
/**
|
||||
* An interface to determine what differs between two
|
||||
* NormalizedObjects
|
||||
*/
|
||||
export interface ChangeAnalyzer<TNormalized extends NormalizedObject> {
|
||||
|
||||
/**
|
||||
* 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: TNormalized, object2: TNormalized): Operation[];
|
||||
}
|
Reference in New Issue
Block a user