📜  typescript 字典包含键 - TypeScript 代码示例

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

代码示例1
A simple example of TypeScript Dictionary so that you can visualize
var persons: { [id: string] : IPerson; } = {};
persons["p1"] = { firstName: "F1", lastName: "L1" };
persons["p2"] = { firstName: "F2" }; // will result in an error