arrayDiff.d.ts 285 B

123456789
  1. declare type EqualFunc<T> = (a: T, b: T) => boolean;
  2. declare type DiffComponent = {
  3. count: number;
  4. added: boolean;
  5. removed: boolean;
  6. indices: number[];
  7. };
  8. export default function arrayDiff<T>(oldArr: T[], newArr: T[], equal?: EqualFunc<T>): DiffComponent[];
  9. export {};