<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.2.1 / nightly (2.2.0-dev.201xxxxx) 2.3.0 **Code** ```ts const test = { a: 1, b: 2 } for (const key of Object.keys(test)) { console.log(test[key]) // should not error } // Current keys(o: any): string[] // Better keys<T>(o: T): Array<keyof T> ```