title: How to recover the typescript 'this' scope from a d3 function?
body: <p>D3 overwrites the 'this' variable, allowing you to see the current selection while in different methods.</p>
  
  <p>I also need 'this' to access class member properties in typescript. I'm currently unsure of how I can retain both whenever I need them.</p>
  
  <pre><code>tweenArc(datum: any, index: number, attr: string) {
      console.log(this);
      console.log(this.classVariable);
  ...
  }
  </code></pre>
  
  <p>The first <code>console.log</code> will write out the d3 selection, which in this case is an svg element.</p>
  
  <p>If I'm trying to access member properties from the class the function is defined in however, I cannot. That <code>console.log</code> returns <code>undefined</code>.</p>