TypeScript Version: 2.2.0
$ node_modules/.bin/tsc --version
Version 2.2.0
Code
let obj: object = {}
for (const attr in obj) {
const val = obj[attr]
}
Expected behavior:
Compiles without errors.
Actual behavior:
some.ts(3,20): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
This is a new feature, so I'm not sure if I'm using this properly, but the error message says that an object type is allowed, so I expect this behavior to be a bug.
TypeScript Version: 2.2.0
Code
Expected behavior:
Compiles without errors.
Actual behavior:
This is a new feature, so I'm not sure if I'm using this properly, but the error message says that
an object typeis allowed, so I expect this behavior to be a bug.