10000 Merge pull request #2275 from DickvdBrink/object-generics · creatio/TypeScript@11bb5f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 11bb5f9

Browse files
committed
Merge pull request microsoft#2275 from DickvdBrink/object-generics
made seal, freeze and preventExtensions generic
2 parents 07a893d + 7001562 commit 11bb5f9

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