13 lines
348 B
TypeScript
13 lines
348 B
TypeScript
|
/**
|
||
|
* Deeply freeze a plain javascript object.
|
||
|
*
|
||
|
* If `process.env.NODE_ENV === 'production'`, this returns the original object
|
||
|
* without freezing.
|
||
|
*
|
||
|
* Or if `process.env.UPDEEP_MODE === 'dangerously_never_freeze'`, this returns the original object
|
||
|
* without freezing.
|
||
|
*
|
||
|
*/
|
||
|
declare function freeze<O>(object: O): O;
|
||
|
export default freeze;
|