Simplify return type of Object.fromEntries (#37457)

PropertyKey is accurate but not usable.

Fixes #31393
This commit is contained in:
Nathan Shively-Sanders
2020-03-18 14:35:19 -07:00
committed by GitHub
parent 2df421b067
commit 062104d9d5
2 changed files with 19 additions and 19 deletions

View File

@@ -5,7 +5,7 @@ interface ObjectConstructor {
* Returns an object created by key-value entries for properties and methods
* @param entries An iterable object that contains key-value entries for properties and methods.
*/
fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k in PropertyKey]: T };
fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T };
/**
* Returns an object created by key-value entries for properties and methods