mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 10:43:51 -05:00
Simplify return type of Object.fromEntries (#37457)
PropertyKey is accurate but not usable. Fixes #31393
This commit is contained in:
committed by
GitHub
parent
2df421b067
commit
062104d9d5
2
src/lib/es2019.object.d.ts
vendored
2
src/lib/es2019.object.d.ts
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user