typescript 报错 类型“never”上不存在属性"XXXX"

在typescript中取对象的值取不出来,报错如下:

使用中括号即可取出来:

 

posted @ 2022-03-04 20:35  To_Hebe  阅读(1130)  评论(0编辑  收藏  举报