So in a browser I receive some JSON in a string through a websocket, and I want to pass it into the constructor that I posted here yesterday. Actually, I overload the constructor (the code is in an mpp and this works fine on the jvm), so it can receive either a string or a map (but not nothing), but I can't seem to get in touch with those constructors. The object I want to construct is a
Message
, and the correct way to go about it in js is
new Message.constructor()
, right? But I cannot make it use my overloaded constructors, they never seem to get called. Must I name them with annotations in order to use them? (Like
@JsName("MessageFromString")
and
@JsName("MessageFromMap")
or something?)