export public interface ~Foo {
public foo: string;
}
export public abstract class Base {
public constructor(@Spec spec: ~i~this) {}
}
export public class Bar extends Base implements Foo {
public baz: int;
}
Transpiled (wrong) output
// Generated by N4JS transpiler; for copyright see original N4JS source file.
import 'n4js-runtime'
export class Base extends N4Object {
constructor(spec) {
super();
const $specObj = spec || {};
}
static get n4type() {
return $getReflectionForClass(this, '["Base","n4/app/reservation/service/action/foo","@enfore/opr-app"]');
}
}
export class Bar extends Base {
constructor(spec) {
super(spec);
const $specObj = spec || {};
this.baz = $specObj.baz;
}
static get n4type() {
return $getReflectionForClass(this, '["Bar","n4/app/reservation/service/action/foo","@enfore/opr-app",["f.baz","f:foo"]]');
}
}
Example
Transpiled (wrong) output