TypeScript hashmap/dictionary interface

asked9 years ago
last updated3 years ago
viewed275.1k times
Up Vote165Down Vote

I'm trying to implement a hashmap/dictionary interface. So far I have:

export interface IHash {
    [details: string] : string;
}

I'm having some trouble understanding what exactly this syntax means. If I were to do var x : IHash = {}; how would I go about adding/accessing the data?