函数参数解构

函数参数解构


    function sayHi({ name, age }: any) {
      console.log(`Hi, ${name}, ${age}`);
    }
     
    sayHi({ name: 'ANDY', age: 18 });
posted @ 2020-12-11 11:51  liaoing  阅读(22)  评论(0编辑  收藏  举报