typescript dictionary contains key

Solutions on MaxInterview for typescript dictionary contains key by the best coders in the world

showing results for - "typescript dictionary contains key"
Mika
04 Jun 2016
1A simple example of TypeScript Dictionary so that you can visualize
2var persons: { [id: string] : IPerson; } = {};
3persons["p1"] = { firstName: "F1", lastName: "L1" };
4persons["p2"] = { firstName: "F2" }; // will result in an error