@launchmenu/core
Version:
An environment for visual keyboard controlled applets
23 lines • 758 B
TypeScript
import { IIdentifiedItem } from "../_types/IIdentifiedItem";
/**
* Retrieves the changes between two stacks of items. Items are only allowed to be removed or added, not switch places (swaps are ignored)
* @param oldItems The previous item list
* @param newItems The new item list
* @returns The added and removed items lists
*/
export declare function findStackChanges<D extends IIdentifiedItem<any>>(oldItems: readonly D[], newItems: readonly D[]): {
added: {
index: number;
item: D;
}[];
removed: {
index: number;
item: D;
}[];
updated: {
/** new index */ index: number;
oldItem: D;
newItem: D;
}[];
};
//# sourceMappingURL=findStackChanges.d.ts.map