How to design an interface like dictionary in typescript code example Example: TS define dictionary const dict: { [key: keyType]: valueType};