Currently following the Angular2 tutorial in VS2015 and encountering an issue with a warning that is impeding the compilation of one of my TypeScript files. The link to the tutorial is provided below.
https://angular.io/docs/ts/latest/tutorial/toh-pt4.html
The warning specifically mentions code typedef with the message expected call-signature: 'getHeroes' to have a typedef.
import { Injectable } from "@angular/core";
import { HEROES } from "./mock-heroes";
@Injectable()
export class HeroService {
getHeroes() {
return Promise.resolve(HEROES);
}
}
I've tried researching but haven't come across any explanations that I could understand since I'm still relatively new and learning...
Could someone please assist me in altering the TypeScript code above to define the return type for the Promise returned by the getHeroes method?