error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
ES5For-of8.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'.


!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== ES5For-of8.ts (1 errors) ====
    function foo() {
        return { x: 0 };
    }
    for (foo().x of ['a', 'b', 'c']) {
         ~~~~~~~
!!! error TS2322: Type 'string' is not assignable to type 'number'.
        var p = foo().x;
    }