error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
parserForInStatement8.ts(3,10): error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
parserForInStatement8.ts(3,10): error TS2802: Type 'string' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
parserForInStatement8.ts(4,10): error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
parserForInStatement8.ts(4,11): error TS2339: Property 'x' does not exist on type 'String'.


!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== parserForInStatement8.ts (4 errors) ====
    // repro from https://github.com/microsoft/TypeScript/issues/54769
    
    for (let [x = 'a' in {}] in { '': 0 }) console.log(x)
             ~~~~~~~~~~~~~~~
!!! error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
             ~~~~~~~~~~~~~~~
!!! error TS2802: Type 'string' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
    for (let {x = 'a' in {}} in { '': 0 }) console.log(x)
             ~~~~~~~~~~~~~~~
!!! error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
              ~
!!! error TS2339: Property 'x' does not exist on type 'String'.
    