📜  具有类型的对象的 typescript 数组 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:21.101000             🧑  作者: Mango

代码示例3
// Create an interface that describes your object
interface Car {
  name: string;
  brand: string;
  price: number;
}

// The variable `cars` below has a type of an array of car objects.
let cars: Car[];