Skip to content

Commit

Permalink
[fix] ES5 Object.keys only accepts an object
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 14, 2018
1 parent ee7d0e2 commit 7a74838
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/lib/es2015.core.d.ts
Expand Up @@ -298,6 +298,12 @@ interface ObjectConstructor {
*/
getOwnPropertySymbols(o: any): symbol[];

/**
* Returns the names of the enumerable properties and methods of an object.
* @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.
*/
keys(o: {}): string[];

/**
* Returns true if the values are the same value, false otherwise.
* @param value1 The first value.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/es5.d.ts
Expand Up @@ -238,7 +238,7 @@ interface ObjectConstructor {
* Returns the names of the enumerable properties and methods of an object.
* @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.
*/
keys(o: {}): string[];
keys(o: object): string[];
}

/**
Expand Down

0 comments on commit 7a74838

Please sign in to comment.