Files
lcbp3.np-dms.work/frontend/node_modules/next/dist/shared/lib/deep-freeze.d.ts
2025-09-21 20:29:15 +07:00

11 lines
512 B
TypeScript
Executable File

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>;