Typescript Interfaces
const oldCivic = {
name : 'civic',
year : 2000,
broken : true
};
interface Vehicle{
name : string ,
year : number ,
broken : boolean
};
function printVehicle(vehicle:Vehicle) :void{
console.log(`Name : ${vehicle.name} \nyear : ${vehicle.year} \nbroken : ${vehicle.broken} `);
}
printVehicle(oldCivic);
INFO