In the following example, the constructor
s are not compatible but their instances are compatible. Why?
class Person { name: string; age: number; constructor(name: string, age: number) { this.name = name; this.age = age; }}class Employee { name: string; age: number; salary: number; constructor(name: string, age: number, salary: number) { this.name = name; this.age = age; this.salary = salary; }}const pCtor: typeof Person = Employee; // error, constructors are not compatibleconst p: Person = new Employee("", 0, 0); // but the instances *are* compatible, how is that possible?