1 | /** @deprecated use IKeyAllowlist */
|
2 | export declare type IKeyWhitelist<T> = IKeyAllowlist<T>;
|
3 | /** @deprecated use IKeyDenylist */
|
4 | export declare type IKeyBlacklist<T> = IKeyDenylist<T>;
|
5 | /** @deprecated use KeyAllowlist */
|
6 | export interface IKeyAllowlist<T> {
|
7 | include: Array<keyof T>;
|
8 | }
|
9 | export declare type KeyAllowlist<T> = IKeyAllowlist<T>;
|
10 | /** @deprecated use KeyDenylist */
|
11 | export interface IKeyDenylist<T> {
|
12 | exclude: Array<keyof T>;
|
13 | }
|
14 | export declare type KeyDenylist<T> = IKeyDenylist<T>;
|
15 | /**
|
16 | * Returns true if the arrays are equal. Elements will be shallowly compared by
|
17 | * default, or they will be compared using the custom `compare` function if one
|
18 | * is provided.
|
19 | */
|
20 | export declare function arraysEqual(arrA: any[], arrB: any[], compare?: (a: any, b: any) => boolean): boolean;
|
21 | /**
|
22 | * Shallow comparison between objects. If `keys` is provided, just that subset
|
23 | * of keys will be compared; otherwise, all keys will be compared.
|
24 | *
|
25 | * @returns true if items are equal.
|
26 | */
|
27 | export declare function shallowCompareKeys<T extends {}>(objA: T, objB: T, keys?: KeyDenylist<T> | KeyAllowlist<T>): boolean;
|
28 | /**
|
29 | * Deep comparison between objects. If `keys` is provided, just that subset of
|
30 | * keys will be compared; otherwise, all keys will be compared.
|
31 | *
|
32 | * @returns true if items are equal.
|
33 | */
|
34 | export declare function deepCompareKeys(objA: any, objB: any, keys?: Array<string | number | symbol>): boolean;
|
35 | /**
|
36 | * Returns a descriptive object for each key whose values are deeply unequal
|
37 | * between two provided objects. Useful for debugging shouldComponentUpdate.
|
38 | */
|
39 | export declare function getDeepUnequalKeyValues<T extends {}>(objA?: T, objB?: T, keys?: Array<keyof T>): {
|
40 | key: keyof T;
|
41 | valueA: T[keyof T];
|
42 | valueB: T[keyof T];
|
43 | }[];
|