报错集锦及解决方案

一 TS2538: Type 'symbol' cannot be used as an index type.

ts 中使用 let 定义 Symbol类型值时候会报改错误,将let 改为const 即可。
解析:Symbol的值为不可变的值,故应该定义为常量而不是变量

posted on 2020-10-29 10:27  长安城下翩翩少年  阅读(355)  评论(0编辑  收藏  举报