class Vehicle { name: string; } class Car extends Vehicle{ type: string; } class Computer { brand: string; } let cars: Array = []; cars[0] = new Car(); cars[1] = new Computer(); //throws a typescript error: "Type 'Computer' is not assignable to type 'Car'" / "Property 'type' is missing in type 'Computer'" console.dir(cars);