Kod który stworzyłem dla przykładu który powoduje błąd :
class A {
sayName(){
console.log("class A");
}
}
class B extends A {
sayName(sufix: string){// czepia się o zmianę parametrów w klasie dziedziczącej
console.log(sufix + "class B");
super.sayName();
}
}
Dokładny błąd :
Property 'sayName' in type 'B' is not assignable to the same property in base type 'A'.
Type '(sufix: string) => void' is not assignable to type '() => void'