Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object.entries generic definition #20322

Closed
ccorcos opened this issue Nov 29, 2017 · 2 comments
Closed

Object.entries generic definition #20322

ccorcos opened this issue Nov 29, 2017 · 2 comments
Labels
Declined The issue was declined as something which matches the TypeScript vision

Comments

@ccorcos
Copy link

ccorcos commented Nov 29, 2017

TypeScript Version: 2.6.2

Currently Object.entries isn't well typed and doesn't account for a union of strings as the keys of an object.

 interface Object {
  entries<X extends string,Y>(o: { [key in X]: Y }): [X, Y][];
}
@mhegazy
Copy link
Contributor

mhegazy commented Nov 29, 2017

Please see #19448 and #15627 and #12253 (comment)

@mhegazy mhegazy added the Declined The issue was declined as something which matches the TypeScript vision label Nov 29, 2017
@ccorcos
Copy link
Author

ccorcos commented Nov 29, 2017

Ah. Thanks

@ccorcos ccorcos closed this as completed Nov 29, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Declined The issue was declined as something which matches the TypeScript vision
Projects
None yet
Development

No branches or pull requests

2 participants