array-comparisoncomparisoncomparison-tooldeep-diffdiffjson-diffnodejsobject-comparisonobject-diffobjectdiffobjectdifferencereactstreamingstreaming-datatypescript
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
666 B
34 lines
666 B
7 months ago
|
export enum LIST_STATUS {
|
||
|
ADDED = "added",
|
||
|
EQUAL = "equal",
|
||
|
DELETED = "deleted",
|
||
|
UPDATED = "updated",
|
||
|
MOVED = "moved",
|
||
|
}
|
||
|
|
||
|
export type ListDiffOptions = {
|
||
|
showOnly?: `${LIST_STATUS}`[];
|
||
|
referenceProperty?: string;
|
||
|
considerMoveAsUpdate?: boolean;
|
||
|
ignoreArrayOrder?: boolean;
|
||
|
};
|
||
|
|
||
|
export const DEFAULT_LIST_DIFF_OPTIONS = {
|
||
|
showOnly: [],
|
||
|
referenceProperty: undefined,
|
||
|
considerMoveAsUpdate: false,
|
||
|
ignoreArrayOrder: false,
|
||
|
};
|
||
|
|
||
|
export type ListDiff = {
|
||
|
type: "list";
|
||
|
status: LIST_STATUS;
|
||
|
diff: {
|
||
7 months ago
|
value: unknown;
|
||
7 months ago
|
prevIndex: number | null;
|
||
|
newIndex: number | null;
|
||
|
indexDiff: number | null;
|
||
|
status: LIST_STATUS;
|
||
|
}[];
|
||
|
};
|