method ObjectConstructor.freeze
Private
ObjectConstructor.freeze<T extends Function>(f: T): T

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Type Parameters

T extends Function

Parameters

f: T

Object on which to lock the attributes.

Return Type

ObjectConstructor.freeze<
T extends { [idx: string]:
U
| null
| undefined
| object
; }
,
U extends
string
| bigint
| number
| boolean
| symbol
,
>
(o: T): Readonly<T>

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Type Parameters

T extends { [idx: string]:
U
| null
| undefined
| object
; }
U extends
string
| bigint
| number
| boolean
| symbol

Parameters

o: T

Object on which to lock the attributes.

Return Type

ObjectConstructor.freeze<T>(o: T): Readonly<T>

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Type Parameters

Parameters

o: T

Object on which to lock the attributes.

Return Type