I created a Dictionary<TValue> on TypeScript, but it doesn't works like I want, unless that I use it like an array instead of object. It's my Dictionary class:
class Dictionary<TValue> {
[index: string]: TValue;
}
So I can only use it like this:
var instanceOfDictionary: Dictionary<string> = ...;
console.log(instanceOfDictionary["test"]);
But I would like use like:
console.log(instanceOfDictionary.test);
Is it possible?