TypeScript/tests/cases/compiler/optionalArgsWithDefaultValues.ts
2014-07-12 17:30:19 -07:00

9 lines
252 B
TypeScript

function foo(x: number, y?:boolean=false, z?=0) {}
class CCC {
public foo(x: number, y?:boolean=false, z?=0) {}
static foo2(x: number, y?:boolean=false, z?=0) {}
}
var a = (x?=0) => { return 1; };
var b = (x, y?:number = 2) => { x; };