error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(52,17): error TS2454: Variable 'nameA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(55,17): error TS2454: Variable 'nameA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(58,17): error TS2454: Variable 'nameA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(61,17): error TS2454: Variable 'primaryA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(64,17): error TS2454: Variable 'primaryA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(68,17): error TS2454: Variable 'primaryA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(92,17): error TS2454: Variable 'nameA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(95,17): error TS2454: Variable 'nameA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(98,17): error TS2454: Variable 'nameA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(101,17): error TS2454: Variable 'nameA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(104,17): error TS2454: Variable 'nameA' is used before being assigned.
sourceMapValidationDestructuringForOfObjectBindingPattern2.ts(108,17): error TS2454: Variable 'nameA' is used before being assigned.


!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== sourceMapValidationDestructuringForOfObjectBindingPattern2.ts (12 errors) ====
    declare var console: {
        log(msg: any): void;
    }
    interface Robot {
        name: string;
        skill: string;
    }
    
    interface MultiRobot {
        name: string;
        skills: {
            primary: string;
            secondary: string;
        };
    }
    
    let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }];
    let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
        { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }];
    
    function getRobots() {
        return robots;
    }
    
    function getMultiRobots() {
        return multiRobots;
    }
    
    let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string;
    let name: string, primary: string, secondary: string, skill: string;
    
    for ({name: nameA } of robots) {
        console.log(nameA);
    }
    for ({name: nameA } of getRobots()) {
        console.log(nameA);
    }
    for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
        console.log(nameA);
    }
    for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
        console.log(primaryA);
    }
    for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
        console.log(primaryA);
    }
    for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
        { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
        console.log(primaryA);
    }
    for ({name } of robots) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }
    for ({name } of getRobots()) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }
    for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }
    for ({ skills: { primary, secondary } } of multiRobots) {
        console.log(primaryA);
                    ~~~~~~~~
!!! error TS2454: Variable 'primaryA' is used before being assigned.
    }
    for ({ skills: { primary, secondary } } of getMultiRobots()) {
        console.log(primaryA);
                    ~~~~~~~~
!!! error TS2454: Variable 'primaryA' is used before being assigned.
    }
    for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
        { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
        console.log(primaryA);
                    ~~~~~~~~
!!! error TS2454: Variable 'primaryA' is used before being assigned.
    }
    
    
    for ({name: nameA, skill: skillA } of robots) {
        console.log(nameA);
    }
    for ({name: nameA, skill: skillA } of getRobots()) {
        console.log(nameA);
    }
    for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
        console.log(nameA);
    }
    for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
        console.log(nameA);
    }
    for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
        console.log(nameA);
    }
    for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
        { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
        console.log(nameA);
    }
    for ({name, skill } of robots) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }
    for ({name, skill } of getRobots()) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }
    for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }
    for ({name, skills: { primary, secondary } } of multiRobots) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }
    for ({name, skills: { primary, secondary } } of getMultiRobots()) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }
    for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
        { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
        console.log(nameA);
                    ~~~~~
!!! error TS2454: Variable 'nameA' is used before being assigned.
    }