mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
17 lines
628 B
TypeScript
17 lines
628 B
TypeScript
//#region src/object/deep-equal.d.ts
|
|
/**
|
|
* Deep structural equality for plain objects, arrays, and primitives. Keys
|
|
* explicitly set to `undefined` are treated as absent (matching JSON
|
|
* semantics), leaf values are compared with `Object.is`, and non-plain
|
|
* objects (class instances, Maps, Sets, etc.) are only equal by reference.
|
|
*
|
|
* @example
|
|
* ```ts
|
|
* deepEqual({ a: [1, { b: 2 }] }, { a: [1, { b: 2 }] }); // true
|
|
* deepEqual({ a: 1, b: undefined }, { a: 1 }); // true
|
|
* ```
|
|
*/
|
|
declare function deepEqual(a: unknown, b: unknown): boolean;
|
|
//#endregion
|
|
export { deepEqual };
|
|
//# sourceMappingURL=deep-equal.d.ts.map
|