Skip to content

Commit 4d51879

Browse files
Use a const type parameter for Object.freeze.
1 parent 5b18979 commit 4d51879

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/es5.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@ interface ObjectConstructor {
207207
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
208208
* @param o Object on which to lock the attributes.
209209
*/
210-
freeze<T extends {[idx: string]: U | null | undefined | object}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
210+
freeze<const T extends {[idx: string]: U | null | undefined | object}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
211211

212212
/**
213213
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
214214
* @param o Object on which to lock the attributes.
215215
*/
216-
freeze<T>(o: T): Readonly<T>;
216+
freeze<const T>(o: T): Readonly<T>;
217217

218218
/**
219219
* Prevents the addition of new properties to an object.

0 commit comments

Comments
 (0)