type long = string | number;
type stringObj = {
[index: string]: string;
}
type NumberObj = {
[index: number]: any;
};
const obj = {
['account']: 'testtest'
}
for (const o in obj) {
console.log(obj[o]);
}
typescript 创建类型
猜你喜欢
转载自www.cnblogs.com/liangcheng11/p/9302677.html
今日推荐
周排行