我在项目中遇到的问题可以简化为: const obj1 = { age: 18 name: 'tom',
age: 19第二个for说的是Type 'string | number' is not assignable to type 'never'.尽管我设法使用了第三个for,但我仍然不能理解为什么Typescript显示这个错误:Type
我有一个简单的对象,有两个字段name和age,最初它们被定义为未定义的,稍后在代码中将赋值 const s={ age:undefineds.name="Test" //error 当我尝试为我的属性赋值时,它会出现typescript错误 Type '"Test"' is not assignabl