此对象是通过接口T定义的。interface T { b: TypeB;} 这应该是此函数的类型签名: (key: keyof T, value: typeof T[key]) => void 这将生成错误:'key' refers to a value, but it is being used as a type here.Did you mean 'typeof key'?。我不是指typeof <e
interface P{ sub: number arr: Array<number> }我的数据可能是{
data[key].map((num:number, index:number)=> ...) // key can not be `sub`. key always be the type `