typescript使用中碰到的问题

1、promise的then回调函数中res是any类型,在使用any类型的属性时报红?

getToken().then(({res}:any) => {
  console.log(res.token)
})

 

posted @ 2025-05-22 13:21  吴飞ff  阅读(7)  评论(0)    收藏  举报