I am targeting JS. The below code appears to work in Flash but no in JS
class Main {
static function main() {
var Users:ObjectMap<String,User> = new ObjectMap();
Users.set("111a",{"id":"6f786e56-2405-4d6f-a6b9-550665b9990f", "email":"em", "name":"hosey"});
}
}
typedef User={
var id:String;
var email:String;
var name:String;
}
Main.hx:192 TypeError: Cannot create property '__id__' on string '111a '(…)
Is there a better Map to use in this case? I am using a Haxe nightly currently. I just need a unique identifier and a User class.
Cheers