Answers for "typescript declare dictionary type"

6

typescript dictionary typing

const dict: { [key: keyType]: valueType};
Posted by: Guest on July-07-2020
0

typescript declare dictionary type

var persons: { [id: string] : string; } = {};
persons["p1"] = { firstName: "F1", lastName: "L1" };
Posted by: Guest on March-09-2022

Code answers related to "TypeScript"

Browse Popular Code Answers by Language