title: What does, "supplied parameters do not match any signature of call target" mean?
body: <p>I'm working on an Angular (1.4.9) application with TypeScript. I'm doing an $http post and am using a method to trigger an alert for success or failure on a registration page. I realized that I would have to pass in the context of the method I'm using to trigger the alert and so, typically, I would do something like:</p>
  
  <pre><code>public showAlert(alertType: string, alertTitle: string, alertMessage: string, alertTimeout: number): void {
      this.alertShow = true;
      this.alertType = alertType;
      this.alertTitle = alertTitle;
      this.alertMessage = alertMessage;
      this.alertTimeout = alertTimeout;
  }
  
  public postIt(): void {
      that: any = this; // &lt;-- See, I know what I'm doing.
  
      var url: string = "/";
      var user: any = {};
  
      this.$http.post(url, user)
          .then((data: any) =&gt; {
              that.showAlert("success", "Yes!", "You are registered.");
          })
          .catch((err: any) =&gt; {
              that.showAlert("warning", "Embarrassing...", "Problem on our end. Try again, later.");
          });
  }
  </code></pre>
  
  <p>But, then I'm like, "Isn't TypeScript smart enough to know what I'm doing, here? Aren't the arrow functions taking care of this for me?" So, I switch it around:</p>
  
  <pre><code>public postIt(): void {
      // var that: any = this; &lt;-- Boom! ...Commented out!
  
      var url: string = "/";
      var user: any = {};
  
      this.$http.post(url, user)
          .then((data: any) =&gt; {
              // it doesn't like the "this"
              this.showAlert("success", "Yes!", "You are registered.");
          })
          .catch((err: any) =&gt; {
              // it doesn't like the "this"
              this.showAlert("warning", "Embarrassing...", "Problem on our end. Try again, later.");
          });
  }
  </code></pre>
  
  <p>I think I'm pretty smart. TypeScript cooperates. I checked the interpreted JavaScript and it's doing just what I thought it would:</p>
  
  <pre><code>myClass.prototype.postIt = function () {
      // var that: any = this;
      var _this = this;
      var url = "/";
      var user = {};
      this.$http.post(url, user)
          .then(function (data) {
          _this.showAlert("success", "Yes!", "You are registered.");
      })
          .catch(function (err) {
          _this.showAlert("warning", "Embarrassing...", "Problem on our end. Try again, later.");
      });
  </code></pre>
  
  <p>...And my application works just fine. But, the compiler throws me an error: "TS2346: Supplied parameters do not match any signature of call target." Considering the situation, I want to read that like it can't find the method. When I have it the original way it doesn't make this complaint. Could you explain what this error is about, exactly? Why isn't this error preventing compilation?</p>