Object.keys to use keyof
staeke opened this issue · 3 comments
staeke commented
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 commented
See #12253 (comment)
zpdDG4gta8XKpMCd commented
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