apphouse
Version:
Component library for React that uses observable state management and theme-able components.
13 lines (12 loc) • 481 B
TypeScript
/**
* Compares keys between two objects and returns an array of missing keys in the second object.
* Nested objects are also checked.
*
* @template T
* @param {T} obj1 - The first object to compare keys.
* @param {T} obj2 - The second object to compare keys against.
* @return {string[]} - An array of missing keys in `obj2` compared to `obj1`.
*/
export declare function compareKeysDeep<T extends {
[key: string]: any;
}>(obj1: T, obj2: T, prefix?: string): string[];