Improve Object.{values,entries} static methods (#18875)

This commit is contained in:
falsandtru
2017-10-10 07:08:22 +09:00
committed by Mohamed Hegazy
parent 5faa739483
commit 661ecc241e
3 changed files with 16 additions and 16 deletions

View File

@@ -3,7 +3,7 @@ interface ObjectConstructor {
* Returns an array of values of the enumerable properties 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.
*/
values<T>(o: { [s: string]: T }): T[];
values<T>(o: { [s: string]: T } | { [n: number]: T }): T[];
/**
* Returns an array of values of the enumerable properties of an object
@@ -15,7 +15,7 @@ interface ObjectConstructor {
* Returns an array of key/values of the enumerable properties 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.
*/
entries<T>(o: { [s: string]: T }): [string, T][];
entries<T>(o: { [s: string]: T } | { [n: number]: T }): [string, T][];
/**
* Returns an array of key/values of the enumerable properties of an object