📌  相关文章
📜  typescript "variable!: type" 表示法 - TypeScript 代码示例

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

代码示例2
// the "last" property is optional and can be undefined
function printName(obj: { first: string; last?: string }) {  // ...}// Both OKprintName({ first: "Bob" });printName({ first: "Alice", last: "Alisson" });Try