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.
33 lines
666 B
33 lines
666 B
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: { |
|
value: unknown; |
|
prevIndex: number | null; |
|
newIndex: number | null; |
|
indexDiff: number | null; |
|
status: LIST_STATUS; |
|
}[]; |
|
};
|
|
|