An inherited method is a method:
- that is defined in an interface that your class implements,
- and defined in your own class
OR
- that is defined in a class that your class extends,
- and NOT defined in your own class
For example:
interface Value<T> {
valueOf(): T;
}
class MediaType implements Value<string> {
// ... other properties left out
// `valueOf()` is inherited from `Value`
public valueOf(): string {
return this.value;
}
}
class ContentType extends MediaType {
// `ContentType` has a method called `valueOf()`
// that is inherited from `MediaType`
}