Skip to content

Update return type Object.keys(o) #38328

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
wants to merge 1 commit into from
Closed

Conversation

Dima-Dim
Copy link

@Dima-Dim Dima-Dim commented May 4, 2020

Object.keys(o) does not return an array of strings, but an array of keys o.

Fixes #

Object.keys(o) does not return an array of strings, but an array of keys o.
@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented May 4, 2020

This is likely not doing what you think it is. First off, typeof will give you {} and keyof typeof {} will give you never. If you wanted to make it generic to have Object.keys return keyof T for a parameter type of T, this is a duplicate of #37495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants