私はこのエラーを得た:escでtypescriptについて私は何をしますか?
[0] app/components/pessoas/detail/PessoaDetailComponent.ts(27,35): error TS2339: Property 'pessoa' does not exist on type '{}'.
コード:
export class PessoaDetailComponent
{
pessoa: any;
constructor(private _api: Api, private _params: RouteParams)
{
this._api.getPessoa(_params.get("id")).then(
(res) => {
//line 27// this.pessoa = res.pessoa;
},
(error) => {
console.error(error);
}
)
}
}
res.pessoaは何を返しますか?どのタイプの価値ですか? – micronyks