Answers for "typescript dictionary contains key"

0

typescript dictionary contains key

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
Posted by: Guest on August-17-2021

Code answers related to "typescript dictionary contains key"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language