title: Why arrow class member functions within Typescript classes don't recognize default values for parameter properties?
body: <p>I am trying to use feature called <a href="https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties" rel="nofollow noreferrer">constructor parameter properties</a> within an example class</p>
  <pre><code>class Human {
    constructor(public gender: string = &quot;male&quot;) {}
  
    printGenderFunction(): void {
      console.log(&quot;printGenderFunction&quot;, this.gender);
    }
  
    printGenderArrow = () =&gt; console.log(this.gender); // TS compiler error: Property 'gender' is used before its initialization.
  }
  let human = new Human(&quot;female&quot;);
  console.log(human.gender);
  human.printGenderFunction();
  </code></pre>
  <p>same code but without the use of the constructor parameter properties works</p>
  <pre><code>class NewHuman {
    public gender: string;
    constructor(gender: string = &quot;male&quot;) {
      this.gender = gender;
    }
  
    printGenderFunction(): void {
      console.log(&quot;printGenderFunction&quot;, this.gender);
    }
  
    printGenderArrow = () =&gt; console.log(&quot;printGenderArrow&quot;, this.gender); // No errors here
  }
  
  let newHuman = new NewHuman(&quot;female&quot;);
  console.log(human.gender);
  newHuman.printGenderFunction();
  newHuman.printGenderArrow();
  </code></pre>
  <p>Why this happens? I thought that constructor parameter properties are meant to be a replacement for the <code>gender</code> property initializations like in the class <code>NewHuman</code></p>