Class-Based Inheritance in TypeScript and the Society
<p>In Object Oriented Programming, class-based inheritance is a fundamental concept. It’s one of the first things you learn in any programming course. It’s also a common topic for a programming job interview questions or exercises.</p>
<p>Inheritance is the mechanism of extending functionality and type from one class to another. I will not go very much into explaining how inheritance works. There are at the moment 65 Million search results on Google for the term <em>“class based inheritance”</em> so I am assuming that the topic is well explained already. Rather I will just pick the <a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Classes_in_JavaScript" rel="noopener ugc nofollow" target="_blank">MDN article</a> which explains it for JavaScript, using the classic “Person” class.</p>
<h1>The “Person” class</h1>
<p>Here’s what a very basic Person class looks like. I’ve taken this from MDN but slightly modified it to better suit this article</p>
<p><a href="https://betterprogramming.pub/class-based-inheritance-in-typescript-and-the-society-14f5e9223d42">Click Here</a></p>