📅  最后修改于: 2022-03-11 14:48:18.311000             🧑  作者: Mango
function sayName({ first, last = 'Smith' }: {first: string; last?: string }): void {
const name = first + ' ' + last;
console.log(name);
}
sayName({ first: 'Bob' });