devFreeze
Public function
Freeze an object when in development mode. Copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
Example
const frozen = devFreeze({ a: 1 })
Signature
function devFreeze<T>(object: T): T
Parameters
Name | Description |
---|---|
|
The object to freeze. |
Returns
T
The frozen object when in development mode, or else the object when in other modes.
Source