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.
24 lines
629 B
24 lines
629 B
import { Key } from './itemUtil';
|
|
/**
|
|
* Get index with specific start index one by one. e.g.
|
|
* min: 3, max: 9, start: 6
|
|
*
|
|
* Return index is:
|
|
* [0]: 6
|
|
* [1]: 7
|
|
* [2]: 5
|
|
* [3]: 8
|
|
* [4]: 4
|
|
* [5]: 9
|
|
* [6]: 3
|
|
*/
|
|
export declare function getIndexByStartLoc(min: number, max: number, start: number, index: number): number;
|
|
/**
|
|
* We assume that 2 list has only 1 item diff and others keeping the order.
|
|
* So we can use dichotomy algorithm to find changed one.
|
|
*/
|
|
export declare function findListDiffIndex<T>(originList: T[], targetList: T[], getKey: (item: T) => Key): {
|
|
index: number;
|
|
multiple: boolean;
|
|
} | null;
|