mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Add stricter parameter types for Object.values and Object.entries (#20553)
* Add stricter parameter types for Object.values and Object.entries * Use mapped type and constrain 'T extends object' * Revert everything but change to parameter types
This commit is contained in:
4
src/lib/es2017.object.d.ts
vendored
4
src/lib/es2017.object.d.ts
vendored
@@ -9,7 +9,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(o: any): any[];
|
||||
values(o: {}): any[];
|
||||
|
||||
/**
|
||||
* Returns an array of key/values of the enumerable properties of an object
|
||||
@@ -21,7 +21,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(o: any): [string, any][];
|
||||
entries(o: {}): [string, any][];
|
||||
|
||||
/**
|
||||
* Returns an object containing all own property descriptors of an object
|
||||
|
||||
Reference in New Issue
Block a user