I need class B extend interface C, however I would like to use implementation of A::methodA to calculate result of B::methodA.
interface C {
methodA(): number
}
class A {
methodA(): string {
return '42'
}
}
class B extends A implements C {
methodA(): string {
return Number(super.methodA()).
}
}
Can I use implementation of class A with inheritance or is association my only hope?