8000 made seal, freeze and preventExtensions generic · cloudpeng/TypeScript@7001562 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7001562

Browse files
committed
made seal, freeze and preventExtensions generic
1 parent eb92b53 commit 7001562

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/core.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,19 @@ interface ObjectConstructor {
164164
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
165165
* @param o Object on which to lock the attributes.
166166
*/
167-
seal(o: any): any;
167+
seal<T>(o: T): T;
168168

169169
/**
170170
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
171171
* @param o Object on which to lock the attributes.
172172
*/
173-
freeze(o: any): any;
173+
freeze<T>(o: T): T;
174174

175175
/**
176176
* Prevents the addition of new properties to an object.
177177
* @param o Object to make non-extensible.
178178
*/
179-
preventExtensions(o: any): any;
179+
preventExtensions<T>(o: T): T;
180180

181181
/**
182182
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.

0 commit comments

Comments
 (0)
0