Hi,
I'm currently writing an extern for a js lib.
here is a part of it:
typedef Struct1 = {
field11 : String
}
typedef Struct2 = {
field21 : String,
? field22 : String
}
@:native("somelib")
extern class SomeLib {
public static function doSomething(ev : String, cb : EitherType<Struct1, Struct2> -> Void) : Void;
}
And somewhere in my app code:
SomeLib.doSomething('anEvent', function(d) {
trace('event field11: ${rd.field11}');
});
This con't compile with the following error: haxe.extern.EitherType<Struct1, Struct2> has no field field11
Can't we use haxe.extern.EitherType with structures ?