mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #12434 from Microsoft/Fix12377
Add special handeling for function and array in Object.freeze
This commit is contained in:
12
src/lib/es5.d.ts
vendored
12
src/lib/es5.d.ts
vendored
@@ -176,6 +176,18 @@ interface ObjectConstructor {
|
||||
*/
|
||||
seal<T>(o: T): T;
|
||||
|
||||
/**
|
||||
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
||||
* @param o Object on which to lock the attributes.
|
||||
*/
|
||||
freeze<T>(a: T[]): ReadonlyArray<T>;
|
||||
|
||||
/**
|
||||
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
||||
* @param o Object on which to lock the attributes.
|
||||
*/
|
||||
freeze<T extends Function>(f: T): T;
|
||||
|
||||
/**
|
||||
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
||||
* @param o Object on which to lock the attributes.
|
||||
|
||||
Reference in New Issue
Block a user