declare interface XType {
a: string;
b: number;
c(): boolean;
}
declare type X = {
prototype: XType,
new(a: string, b: number): XType
}
declare type Y = X;
declare var Y: Y;
In this case we should emit a class declaration of Y with the members of XType and the constructor of X:
@JS()
class Y {
// @Ignore
Y.fakeConstructor$();
external String get a;
external set a(String v);
external num get b;
external set b(num v);
external bool c();
external factory Y(String a, num b);
}`);
In this case we should emit a class declaration of Y with the members of XType and the constructor of X: