interface Person { readonly id:number; name:string; age?:number; }
function add(x:number=2,y:number,z?:number):number{ if(typeof z ==="number"){ return x+y+z } return x+y } add(1,2,3) const add2 :(x:number,y:number,z?:number) =>number=add