I\'m new to using TypeScript and I\'m trying to implement a hashmap/dictionary interface. So far I have
export interface IHash { [details: string] : string;
The most simple and the correct way is to use Record type Record
const myVar : Record = { key1: 'val1', key2: 'val2', }