title: What type of Typescript return value should I use for a $http call that returns nothing other than success?
body: <p>I created a service using Typescript:</p>
  
  <pre><code>class ConfigService implements IConfigService {
  
      public admin = {};
      public adminBackup = {};
      public user = {};
      public loaded = false;
  
      constructor(
          private $http: ng.IHttpService,
          private $q: ng.IQService
          ) {
  
      }
  
      static $inject = [
          '$http',
          '$q'
      ];
  
      put = ():ng.IHttpPromise&lt;&gt; =&gt; {
          var defer = this.$q.defer();
          if (angular.equals(this.admin, this.adminBackup)) {
              return defer.resolve();
          } else {
              this.$http({
                  data: {
                      adminJSON: JSON.stringify(this.admin),
                      userJSON: JSON.stringify(this.user)
                  },
                  url: '/api/Config/Put',
                  method: "PUT"
              })
                  .success(function (data) {
                      this.adminBackup = angular.copy(this.admin);
                      this.userBackup = angular.copy(this.user)
                      return defer.resolve();
                  });
          }
          return defer.promise;
      };
  
  }
  </code></pre>
  
  <p>I also created this interface:</p>
  
  <pre><code>interface IConfigService {
       put(): ng.IHttpPromise&lt;&gt;;
  }
  </code></pre>
  
  <p>However the code is giving me an error saying:</p>
  
  <pre><code>Error   3   Cannot convert 'void' to 'ng.IHttpPromise&lt;any&gt;'.    
  
  Error   4   Cannot convert 'ng.IPromise&lt;{}&gt;' to 'ng.IHttpPromise&lt;any&gt;':
      Type 'ng.IPromise&lt;{}&gt;' is missing property 'success' from type 'ng.IHttpPromise&lt;any&gt;'.  
  </code></pre>