google一下 c overiding发现有这样一段英文解释: Because C doesn't require that you pass all parameters to the function if you leave the parameter list blank in the prototype. The compiler should only throw up warnings if the prototype has a non-empty parameter list…
1 方法的参数 1.1 必选参数 调用方法时实参的个数必须和定义方法时形参在数量和类型上匹配 /** * Created by Administrator on 2017/8/2 0002. */ function test(x: number): number { return x + 10; } let y = test(210); console.log(y); // let y02 = test(); // 报错:缺少参数信息 /** * Created by Administrator…