title: self = this but cannot access self.function within a callback
body: <p>I have the following block of code to store the correct reference to <code>this</code>. 
  I am using Mongoose for <code>Models.Image</code>.</p>
  
  <pre><code>class some {
      public one() {
          var self = this;
          this.another(); //edited: this.another() is not a function
          Models.Image.findById(id).then(function(data) {
              self.another(); //self.another is not a function
              ....
          });
      }
      public another() {
          ....
      }
  }
  </code></pre>
  
  <p>The linter is showing <code>self</code> to be <code>this</code> but when I execute it, gives me error. What is happening here? How to solve it?</p>
  
  <p>The class is a route handler bound to express routes.</p>
  
  <p>I would like to add more. Calling <code>this.another()</code> within the <code>one()</code> (not callback) is still giving me <code>is not a function</code> error. Somehow, <code>this</code> is not referencing the class.
  What may be the problem?</p>