differify-js
Version:
Differify allows you to get the diff between two entities (objects diff, arrays diff, date diff, functions diff, number diff, etc) very easily, quickly and in a friendly way.
19 lines (18 loc) • 460 B
TypeScript
import PROPERTY_STATUS from '../enums/property-status';
export type propDiff = {
original: any;
current: any;
status: PROPERTY_STATUS;
changes: number;
_?: undefined;
};
export type deepPropDiff = {
_: {
[key: string]: propDiff | deepPropDiff;
} | Array<any> | null;
status: PROPERTY_STATUS;
changes: number;
original?: undefined;
current?: undefined;
};
export type multiPropDiff = deepPropDiff | propDiff;