add docs, rename classes for clarity

This commit is contained in:
Art Lowel
2019-01-17 14:59:48 +01:00
parent e387f9446f
commit 586a4ac35b
23 changed files with 186 additions and 77 deletions

View 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[];
}