1
给定一个对象为什么我的对象会在打字稿中引发无字符串索引签名错误?
const appConfig: {
brands: {...},
market: {...},
}
我尝试通过以解构它打字稿:
const {brand} = appConfig.brand;
通过它失败:
src/partner/transform.ts(17,12): error TS2459: Type 'IBrandConfig' has no property 'brand' and no string index signature.