运行 ❯
获取你
自己的 Node
服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
// Try creating a new Car using the alias provided type CarYear = number; type CarType = string; type CarModel = string; type Car = { year: CarYear, type: CarType, model: CarModel }; const carYear: CarYear = 2001 const carType: CarType = "Toyota" const carModel: CarModel = "Corolla" const car: Car = { year: carYear, type: carType, model: carModel }; console.log(car);
{ year: 2001, type: 'Toyota', model: 'Corolla' }