title: Passing a callback from module A to B with bound this, still has scope of B. Using babel
body: <p>How come if I pass this 'test' function from module A to module B: </p>
  
  <pre><code> //A.js
  import B from './B'
  export default {
      self: this,
      test: ()=&gt; {
          console.log(self === this)  // this should return true but doesn't because when B calls it, "this" is B
      },
      initA:function() {
          B.initB(this.test); // b is undefined here
      }
  };
  
  //B.js
  export default {
    callback: null,
    initB: function (func) {
      callback = func;
    },
    startTest: function () {
      this.callback();
    }
  };
  </code></pre>
  
  <p>that the scope of <code>this</code> is still B when I run callback() in B.js? Also doesn't work if I make this function an arrow function.</p>
  
  <p>I have created a repo demonstrating this issue:</p>
  
  <p><a href="https://github.com/es6Test/babel-test" rel="nofollow">https://github.com/es6Test/babel-test</a></p>
  
  <p>hopefully someone with experience of this will be able to give a quick and easy solution.</p>