/** * Deep equality with NaN-safety and cycle detection. * * - `NaN === NaN` is false in JavaScript, so the previous `Object.is` * tail correctly handled that case but only at the leaf — a * `[NaN, NaN]` pair compared element-by-element worked, but compound * structures relied on the tail. The new shape preserves that. * - Circular references used to send isDeepEqual into infinite recursion * (`a.self = a; isDeepEqual(a, a)` blew the stack). A WeakSet of * already-visited objects breaks the cycle and treats two structurally * identical cycles as equal. * - Dates, regular expressions, Maps and Sets are compared by what they * HOLD. Only arrays and plain objects had branches, so everything else * fell through to the `Object.is` tail — which for an object means * reference identity. `isDeepEqual(new Date(0), new Date(0))` was * therefore false, as were two equal `/a/g`s, two Maps with the same * entries and two Sets with the same members. A Date nested anywhere * inside a structure took the whole comparison down with it, which is * how this stayed unnoticed: the common shapes are objects and arrays, * and those worked. Typed arrays and ArrayBuffers compare by their bytes * for the same reason. * - Errors and host objects (URL, Headers, Blob, …) are deliberately NOT * handled and still compare by identity. Unlike the types above they have * no single obvious structural identity - whether two Errors with the same * message but different stacks are "equal" is a policy question, not a * fact - and there is no end to the list. Guessing an answer silently is * what made the cases above wrong. */ export declare function isDeepEqual(value1: unknown, value2: unknown, seen?: WeakMap): boolean;