updeep-remeda/types/freeze.d.ts
2019-01-18 19:51:59 -05:00

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;