diff --git a/public/docs/_examples/toh-6/ts/src/app/hero.service.ts b/public/docs/_examples/toh-6/ts/src/app/hero.service.ts index 18af476123..29fe5c2e0e 100644 --- a/public/docs/_examples/toh-6/ts/src/app/hero.service.ts +++ b/public/docs/_examples/toh-6/ts/src/app/hero.service.ts @@ -61,7 +61,7 @@ export class HeroService { return this.http .post(this.heroesUrl, JSON.stringify({name: name}), {headers: this.headers}) .toPromise() - .then(res => res.json().data) + .then(res => res.json().data as Hero) .catch(this.handleError); } // #enddocregion create