objects.d.mts 580 B

12345678910111213141516
  1. /**
  2. * Compares two objects, returns true if identical
  3. *
  4. * Reference object contains keys
  5. */
  6. declare function compareObjects<T extends Record<string, unknown>>(obj1: T, obj2: T, ref?: T): boolean;
  7. /**
  8. * Unmerge objects, removing items that match in both objects
  9. */
  10. declare function unmergeObjects<T extends Record<string, unknown>>(obj1: T, obj2: T): T;
  11. /**
  12. * Get common properties in 2 objects
  13. */
  14. declare function commonObjectProps<T extends Record<string, unknown>>(item: unknown, reference: T): Partial<T>;
  15. export { commonObjectProps, compareObjects, unmergeObjects };