[fix] ES5 Object.keys only accepts an object (#27089)

This commit is contained in:
Jordan Harband
2019-04-24 10:18:31 -07:00
committed by Ryan Cavanaugh
parent 6608349ea2
commit d4ff58d53f
12 changed files with 27 additions and 21 deletions

View File

@@ -298,6 +298,12 @@ interface ObjectConstructor {
*/
getOwnPropertySymbols(o: any): symbol[];
/**
* Returns the names of the enumerable string 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.

4
src/lib/es5.d.ts vendored
View File

@@ -235,10 +235,10 @@ interface ObjectConstructor {
isExtensible(o: any): boolean;
/**
* Returns the names of the enumerable properties and methods of an object.
* Returns the names of the enumerable string 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[];
}
/**