4
then
約束に渡されたデータ構造のTypescriptエラーを取り除くにはどうすればよいですか?次のコードについてプロパティ 'count'が型 '{}'に存在しません
Property 'count' does not exist on type '{}'
:
私は次のエラーを取得しています、私は推測してい
this.userData.getSocialLinks(this.navParams.get('image_owner_id')).then(socialLinks => {
var i = 0;
for (i=0; i < socialLinks.count; i++) {
if (socialLinks.results[i].social_type == 'TW') {
this.profile.twitter = socialLinks.results[i].social_address;
this.isExistingTW = true;
this.twEntryID = socialLinks.results[i].id;
}
else if (socialLinks.results[i].social_type == 'IN') {
this.profile.instagram = socialLinks.results[i].social_address;
this.isExistingIN = true;
this.inEntryID = socialLinks.results[i].id;
}
}
});
私は何とかsocialLinks
を定義する必要がなく、どこうまくできません。
作品のおかげで
IData<IPerson>
プレイを使用することができます。 –