error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
protectedClassPropertyAccessibleWithinNestedClass.ts(4,15): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
protectedClassPropertyAccessibleWithinNestedClass.ts(19,26): error TS2454: Variable 'x' is used before being assigned.
protectedClassPropertyAccessibleWithinNestedClass.ts(20,26): error TS2454: Variable 'x' is used before being assigned.
protectedClassPropertyAccessibleWithinNestedClass.ts(21,26): error TS2454: Variable 'x' is used before being assigned.
protectedClassPropertyAccessibleWithinNestedClass.ts(22,26): error TS2454: Variable 'x' 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.
==== protectedClassPropertyAccessibleWithinNestedClass.ts (5 errors) ====
    // no errors
    
    class C {
        protected x: string;
                  ~
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
        protected get y() { return this.x; }
        protected set y(x) { this.y = this.x; }
        protected foo() { return this.foo; }
    
        protected static x: string;
        protected static get y() { return this.x; }
        protected static set y(x) { this.y = this.x; }
        protected static foo() { return this.foo; }
        protected static bar() { this.foo(); }
    
        protected bar() {
            class C2 {
                protected foo() {
                    let x: C;
                    var x1 = x.foo;
                             ~
!!! error TS2454: Variable 'x' is used before being assigned.
                    var x2 = x.bar;
                             ~
!!! error TS2454: Variable 'x' is used before being assigned.
                    var x3 = x.x;
                             ~
!!! error TS2454: Variable 'x' is used before being assigned.
                    var x4 = x.y;
                             ~
!!! error TS2454: Variable 'x' is used before being assigned.
    
                    var sx1 = C.x;
                    var sx2 = C.y;
                    var sx3 = C.bar;
                    var sx4 = C.foo;
    
                    let y = new C();
                    var y1 = y.foo;
                    var y2 = y.bar;
                    var y3 = y.x;
                    var y4 = y.y;
                }
            }
        }
    }