Check out example codes for "TS define dictionary". It will help you in understanding the concepts better.

Code Example 1

const dict: { [key: keyType]: valueType};

Learn ReactJs, React Native from akashmittal.com