Closed
Description
TypeScript Version: 2.1.4
Code
// A *self-contained* demonstration of the problem follows...
export class ClassA {
public clean() {
for (let prop in this) {
if (typeof this[prop] === "boolean") this[prop] = false;
}
}
}
Expected behavior:
Compiled without error
Actual behavior:
Error Type false is not assignable to type this[keyof this]