/** * Recursively (deep) freezes objects/arrays and freezes nested values (best-effort). * * Important: JavaScript cannot universally enforce deep immutability for every built-in. * This function makes the *returned value* behave as readonly where possible. * * Notes on exotic built-ins: * - `Map`/`Set` internal entries are not made immutable by `Object.freeze`, so this function returns a readonly `Proxy` * that throws on mutating operations. * - `Date` and ArrayBuffer views (TypedArrays/DataView/Buffer) have mutating APIs that bypass `Object.freeze`, so this * function returns a readonly `Proxy` that throws on common mutators. * - If other code still holds a reference to the original mutable object, it can mutate it directly; `freeze()` cannot * prevent that. * * @template T - The type of the value to freeze. * @param value - The value to freeze. * @returns A readonly version of the value, with nested values frozen where possible. */ export declare function freeze(value: T): Readonly;