title: Type 'IPromise<{}>' is not assignable to type 'IPromise<TemplatesPagingModel>' typescript 2.8.0
body: <p>i am using angularjs (1.5.8) framework with latest typescript (2.8.0) files. The below code is not compiled after updating to the latest typescript version.</p>
  
  <p>Angular interface implementation:</p>
  
  <pre><code>interface IPromise&lt;T&gt; {
      /**
       * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
       * The successCallBack may return IPromise&lt;void&gt; for when a $q.reject() needs to be returned
       * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
       */
      then&lt;TResult&gt;(successCallback: (promiseValue: T) =&gt; IPromise&lt;TResult&gt;|TResult, errorCallback?: (reason: any) =&gt; any, notifyCallback?: (state: any) =&gt; any): IPromise&lt;TResult&gt;;
  
      /**
       * Shorthand for promise.then(null, errorCallback)
       */
      catch&lt;TResult&gt;(onRejected: (reason: any) =&gt; IPromise&lt;TResult&gt;|TResult): IPromise&lt;TResult&gt;;
  
      /**
       * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
       *
       * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
       */
      finally(finallyCallback: () =&gt; any): IPromise&lt;T&gt;;
  }
  </code></pre>
  
  <p>ITemplate interface:</p>
  
  <pre><code>export interface ITemplateService {
  /**
   * Scroll to 
   * @param inputFieldId 
   * @param offset 
   * @param ms 
   * @returns {} 
   */
  getTemplates(dto?: TemplateFilterPostDto): ng.IPromise&lt;TemplatesPagingModel&gt;;
  
  /**
   * Set template groups as comma seperated for list presentation
   * @param template The template to use
   */
  setTemplateGroupsAsCommaSeperated(template: TemplateModel): void;
  }
  </code></pre>
  
  <p>The class implementing ITemplateService:</p>
  
  <pre><code>export default class TemplateService implements ITemplateService {
  
  public static $inject = ["TemplateRepository", "$q", "MappingService"];
  
  private initialTemplateFilter: ITemplateFilterPostDto = {
      currentPage: 1,
      group: null,
      name: null,
      totalResults: ConfigurationService.TOTAL_ROWS[0]
  };
  
  constructor(
      public templateRepository: ITemplateRepository,
      public $q: ng.IQService,
      public mappingService: IMappingService) {
  }
  
  public getTemplates(dto?: ITemplateFilterPostDto): ng.IPromise&lt;TemplatesPagingModel&gt; {        
      const defer = this.$q.defer();
  
      this.templateRepository.getTemplates(dto ? dto : this.initialTemplateFilter, ConfigurationService.templatesFields).then((result) =&gt; {
  
              const templatesWithTotal = this.mappingService.validate&lt;TemplatesPagingModel&gt;(result.data, "TemplatesPagingDto", "[]");
  
              _.forEach(templatesWithTotal.templates,
                  (template) =&gt; {
                      this.setTemplateGroupsAsCommaSeperated(template);
                  });
  
              defer.resolve(templatesWithTotal);
  
          }, () =&gt; {
              defer.reject();
          });
      return defer.promise;
  }
  
  public setTemplateGroupsAsCommaSeperated(template: TemplateModel): void {
      template.groupsCommaSeparated = template.groups.map((g) =&gt; { return g.name; }).join(",");
  }
  }
  </code></pre>
  
  <p>I am getting the following error after to the latest typescript (2.8.0):</p>
  
  <p>'Type 'IPromise&lt;{}>' is not assignable to type 'IPromise'.
  Type '{}' is not assignable to type 'TemplatesPagingModel'. Property 'templates' is missing in type '{}'. </p>