Skip to content

Commit 7a74838

Browse files
committed
[fix] ES5 Object.keys only accepts an object
1 parent ee7d0e2 commit 7a74838

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/lib/es2015.core.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@ interface ObjectConstructor {
298298
*/
299299
getOwnPropertySymbols(o: any): symbol[];
300300

301+
/**
302+
* Returns the names of the enumerable properties and methods of an object.
303+
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
304+
*/
305+
keys(o: {}): string[];
306+
301307
/**
302308
* Returns true if the values are the same value, false otherwise.
303309
* @param value1 The first value.

src/lib/es5.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ interface ObjectConstructor {
238238
* Returns the names of the enumerable properties and methods of an object.
239239
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
240240
*/
241-
keys(o: {}): string[];
241+
keys(o: object): string[];
242242
}
243243

244244
/**

0 commit comments

Comments
 (0)