title: ERROR: Property 'then' does not exist on type 'Hero[]'
body: <p>app.component.ts file</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Hero } from './hero';
  import { HeroService } from './hero.service';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css'],
    providers: [HeroService]
  })
  
  export class AppComponent implements OnInit{
    title = 'Tour of Heroes';
    heroes : Hero[ ];
    selectedHero : Hero;
    constructor(private heroService: HeroService) { }
        getHeroes(): void {
       this.heroService.getHeroes().then(heroes =&gt; this.heroes = heroes);
    };
      ngOnInit(): void {
      this.getHeroes();
    };
      onSelect(hero: Hero): void{
      this.selectedHero = hero;
    };
  }
  </code></pre>
  
  <p><strong>hero.service.ts</strong> </p>
  
  <pre><code>import { Injectable } from '@angular/core'; 
  import { Hero } from './hero'; 
  import { HEROES } from './mock-heroes'; 
  
  @Injectable() 
  export class HeroService { 
  
      getHeroes(): Promise&lt;Hero[]&gt; { 
          return Promise.resolve(HEROES); 
      } 
  }
  </code></pre>
  
  <p>How to resolve this error?</p>