This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
2025-01-11 09:54:09 +03:00

11 lines
512 B
TypeScript

import type { DeepReadonly } from './deep-readonly';
/**
* Recursively freezes an object and all of its properties. This prevents the
* object from being modified at runtime. When the JS runtime is running in
* strict mode, any attempts to modify a frozen object will throw an error.
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
* @param obj The object to freeze.
*/
export declare function deepFreeze<T extends object>(obj: T): DeepReadonly<T>;