mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 00:36:29 -05:00
[fix] ES5 Object.keys only accepts an object (#27089)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
6608349ea2
commit
d4ff58d53f
6
src/lib/es2015.core.d.ts
vendored
6
src/lib/es2015.core.d.ts
vendored
@@ -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
4
src/lib/es5.d.ts
vendored
@@ -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[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user