我遇到了一个与Record<string, unknown> (当然还有Record<string, any>)匹配我没有预料到的类型的问题。says it never happens") console.log("typing says it always happens")运行上面的代码将打印typing如果我不能将Record<string</em
如果在strict中启用了tsconfig.json,为什么tsc在索引never类型的对象时不发出错误?const mystery = ({ foo: 1 } as never)
console.log(mystery.foo) // Property 'foo' does not exist on type 'never