clutz
clutz copied to clipboard
Gents adds fields to subclass when the fields exist in superclass.
class B {
constructor() {
/** @type {number} */
this.foo = 1;
}
}
class C extends B {
constructor() {
super();
}
f() {
this.foo = 2;
}
}
is migrated to
class B {
foo: number = 1;
}
class C extends B {
foo: any; // Wrong
constructor() {
super();
}
f() {
this.foo = 2;
}
}