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.keys to use keyof #13254

Closed
staeke opened this issue Jan 2, 2017 · 3 comments
Closed

Object.keys to use keyof #13254

staeke opened this issue Jan 2, 2017 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@staeke
Copy link

staeke commented Jan 2, 2017

TypeScript Version: 2.1.1

Code
With the latest keyof feature in TypeScript, I'd expect Object.keys() to return them. In code:

interface ObjectConstructor {
  ...
  keys<T>(o: T): Array<keyof T>;
}
@jwbay
Copy link
Contributor

jwbay commented Jan 2, 2017

See #12253 (comment)

@zpdDG4gta8XKpMCd
Copy link

you can make a local copy of lib.d.ts then turn off standard definition --noLib from command line or "noLib" from tsconfig.json and then rewrite the local lib.d.ts anyway you want, including a fix to Object.keys

@staeke
Copy link
Author

staeke commented Jan 2, 2017

@jwbay thanks. Anders's comment in the other thread makes perfect sense. I'll close this.

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

No branches or pull requests

4 participants