jsm-utilities
Version:
A utilities library.
25 lines (24 loc) • 873 B
TypeScript
export declare class ObjectUpdatedPropertyObject {
old_value: any;
new_value: any;
constructor(old_value: any, new_value: any);
}
export default class ObjectUpdatedProperties<T extends object, E extends Jsm.Core.Utils.DocumentProperties<T>> {
private updates;
private _exclude;
/**
*
* @param {object} oldObj
* @param {object} newObj
* @param {true | string[]} exclude if true, it will exclude default fields of Entity.General.ICreatable and Entity.General.IHasSearchMeta
*/
constructor(oldObj: Partial<T>, newObj: Partial<T>, exclude?: true | Array<E>);
private getUpdatedProperties;
get asObject(): object;
get asArray(): {
field: Jsm.Core.Utils.DocumentProperties<T>;
old_value: any;
new_value: any;
}[];
isModified(field: Jsm.Core.Utils.DocumentProperties<T>): boolean;
}