typescript dictionary contains key

The solution for “typescript dictionary contains key” can be found here. The following code will assist you in solving the problem.

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

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in