Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Merge variables whose types are aliases of types with constructors #68

Open
derekxu16 opened this issue Nov 22, 2019 · 0 comments
Open

Comments

@derekxu16
Copy link
Contributor

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);
}`);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant