TypeScript-Handbook icon indicating copy to clipboard operation
TypeScript-Handbook copied to clipboard

Inheritance section covers overriding, not inheritance

Open kodenix opened this issue 8 years ago • 1 comments

Hello, i learning the typescript tutorial and the example with inheritance is confusing but not exist a example using the method of mother class directily without defined other method with the same name. This can cause confusing a otros, i suggest show a example simple o f inherit if is possible.

Example:

class Mother {
protected talk(){
console.log('Hello');
}
}

class Child extends Mother {

}

let child=new Child();
child.talk();

Best reggards

kodenix avatar Oct 23 '17 07:10 kodenix

If I understand this issue correctly, I think you're right. The handbook seems to assume people are already familiar with inheritance and overriding.

DanielRosenwasser avatar Oct 25 '17 20:10 DanielRosenwasser