title: Forward-closure of `this` before calling `super(...)` (or: "the mind-bending story of WTF seriously")
body: <p>after some fiddling, I ended up writing this in TypeScript:</p>
  
  <pre class="lang-js prettyprint-override"><code> class B extends A{
       constructor() {
           const c = new C(() =&gt; this.method());
           super(c);
           c.someMethod(this);
       }
   }
  </code></pre>
  
  <p>And it works ...</p>
  
  <p><em>Let's set aside why I did this for a second (irrelevant to my question)</em></p>
  
  <p>My questions are :</p>
  
  <ul>
  <li>How in the world does it compile when I do things before the call to <code>super</code> ?!</li>
  <li>How can the line <code>const c = new C(() =&gt; this.method());</code> closure <code>this</code> when it is not yet defined ?
  
  <ul>
  <li>at least <code>this</code> should not be available or I'd rather have done <code>const c = new C(this.method);</code> but it did not compile, complaining that <code>this is not, yet, available</code>.</li>
  </ul></li>
  </ul>
  
  <p>I am missing something there :/</p>