updeep-remeda/types/freeze.d.ts

13 lines
348 B
TypeScript
Raw Normal View History

2019-01-19 00:46:25 +00:00
/**
* 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;