📜  typescript 键值数组 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:35.456000             🧑  作者: Mango

代码示例2
let indexedArray: {[key: string]: number}

let indexedArray: {[key: string]: number} = {
    foo: 123,
    bar: 456
}

indexedArray['foo'] = 12;
indexedArray.foo= 45;