Skip to content

Object.keys must use keyof of generic type <T extends object>, not just <T> #30749

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

Closed
Boeny opened this issue Apr 4, 2019 · 2 comments
Closed
Labels
Duplicate An existing issue was already created

Comments

@Boeny
Copy link

Boeny commented Apr 4, 2019

Despite the comment #12253 (comment)
I would proceed the discussion with just a little suggestion:

the Object.keys function should look like:
keys<T extends {}>(o: T): Array<keyof T>;

@Boeny Boeny changed the title Object.keys must use keyof of generic type <T extended object>, but not just <T> Object.keys must use keyof of generic type <T extends object>, not just <T> Apr 4, 2019
@j-oliveras
Copy link
Contributor

Duplicate and rejected multiple times: #12253 (comment), #30314, #13254. #30228, #28899, #28284, #26901.

More info

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Apr 4, 2019
@RyanCavanaugh
Copy link
Member

Thanks @j-oliveras - much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants