unusedParametersThis.ts(2,12): error TS2564: Property 'a' has no initializer and is not definitely assigned in the constructor.


==== unusedParametersThis.ts (1 errors) ====
    class A {
        public a: number;
               ~
!!! error TS2564: Property 'a' has no initializer and is not definitely assigned in the constructor.
    
        public method(this: this): number {
            return this.a;
        }
    
        public method2(this: A): number {
            return this.a;
        }
    
        public method3(this: this): number {
            var fn = () => this.a;
            return fn();
        }
    
        public method4(this: A): number {
            var fn = () => this.a;
            return fn();
        }
    
        static staticMethod(this: A): number {
            return this.a;
        }
    }
    
    function f(this: A): number {
        return this.a
    }
    
    var f2 = function f2(this: A): number {
        return this.a;
    };