📜  typescript 实现 - TypeScript 代码示例

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

代码示例1
tsinterface LabeledValue {  label: string;} function printLabel(labeledObj: LabeledValue) {  console.log(labeledObj.label);} let myObj = { size: 10, label: "Size 10 Object" };printLabel(myObj);Try