Simplified, I have the following node js module, that I want to define in extern somehow.
In the JS module there is a property on itself that’s content is also a require of another module that contains multiple classes.
So my main module require another module, and I can access that module through that property in JS. But how can I define such think with externs. I reached something, but it’s really not what I want:
extern class MainModule {
var util:Util
}
extern typedef Util {
var ApplicationError:Class<ApplicationError>;
}
extern class ApplicationError {
function new(msg:String);
}