When using the super() method inside a subclass' method it's not being transpiled.
The super() inside a constructor works like a charm though.
for example here:
class Parent {
constructor(){}
add(){}
}
class Child extends Parent {
constructor() {
super();
}
add() {
super();
}
}
The constructor's super is properly transpiled to:
function Child() {
super$0.call(this);
}
whereas the super inside add is kept as is:
Child.prototype.add = function() {
super();
}
Did I misunderstand something? is super not supposed to be used in any method?
When using the
super()
method inside a subclass' method it's not being transpiled.The
super()
inside a constructor works like a charm though. for example here:The constructor's super is properly transpiled to:
whereas the super inside add is kept as is:
Did I misunderstand something? is
super
not supposed to be used in any method?Thank you. Victor