I'm migrating from AS3 to Typescript and I see that in Typescript there are no dictionaries
is there any way to create a dictionary key value with the key can be one: any?
CodePudding user response:
I think you are looking for Map.
A Map's keys can be any value (including functions, objects, or any primitive), which is similar to Dictionary. I think that's what you mean by "the key can be one: any"?
Otherwise, you'd typically just use an Object if you are able to use strings for the keys.