2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts ===
|
|
|
|
// Optional parameters should be valid in all the below casts
|
|
|
|
|
|
|
|
function foo(x?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : (x?: number) => any, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,0,0),Decl(callSignaturesWithOptionalParameters2.ts,2,25))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,2,13))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo(x?: number) { }
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : (x?: number) => any, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,0,0),Decl(callSignaturesWithOptionalParameters2.ts,2,25))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,3,13))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(1);
|
|
|
|
>foo(1) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : (x?: number) => any, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,0,0),Decl(callSignaturesWithOptionalParameters2.ts,2,25))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo();
|
|
|
|
>foo() : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : (x?: number) => any, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,0,0),Decl(callSignaturesWithOptionalParameters2.ts,2,25))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo2(x: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(foo2,Decl(callSignaturesWithOptionalParameters2.ts,6,6),Decl(callSignaturesWithOptionalParameters2.ts,8,25),Decl(callSignaturesWithOptionalParameters2.ts,9,37))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,8,14))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo2(x: number, y?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(foo2,Decl(callSignaturesWithOptionalParameters2.ts,6,6),Decl(callSignaturesWithOptionalParameters2.ts,8,25),Decl(callSignaturesWithOptionalParameters2.ts,9,37))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,9,14))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,9,24))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo2(x: number, y?: number) { }
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(foo2,Decl(callSignaturesWithOptionalParameters2.ts,6,6),Decl(callSignaturesWithOptionalParameters2.ts,8,25),Decl(callSignaturesWithOptionalParameters2.ts,9,37))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,10,14))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,10,24))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo2(1);
|
|
|
|
>foo2(1) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(foo2,Decl(callSignaturesWithOptionalParameters2.ts,6,6),Decl(callSignaturesWithOptionalParameters2.ts,8,25),Decl(callSignaturesWithOptionalParameters2.ts,9,37))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo2(1, 2);
|
|
|
|
>foo2(1, 2) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(foo2,Decl(callSignaturesWithOptionalParameters2.ts,6,6),Decl(callSignaturesWithOptionalParameters2.ts,8,25),Decl(callSignaturesWithOptionalParameters2.ts,9,37))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
|
|
|
>2 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
class C {
|
2015-04-13 22:54:22 +02:00
|
|
|
>C : C, Symbol(C,Decl(callSignaturesWithOptionalParameters2.ts,13,11))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(x?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : (x?: number) => any, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,15,9),Decl(callSignaturesWithOptionalParameters2.ts,16,20))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,16,8))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(x?: number) { }
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : (x?: number) => any, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,15,9),Decl(callSignaturesWithOptionalParameters2.ts,16,20))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,17,8))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo2(x: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(foo2,Decl(callSignaturesWithOptionalParameters2.ts,17,23),Decl(callSignaturesWithOptionalParameters2.ts,19,20),Decl(callSignaturesWithOptionalParameters2.ts,20,32))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,19,9))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo2(x: number, y?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(foo2,Decl(callSignaturesWithOptionalParameters2.ts,17,23),Decl(callSignaturesWithOptionalParameters2.ts,19,20),Decl(callSignaturesWithOptionalParameters2.ts,20,32))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,20,9))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,20,19))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo2(x: number, y?: number) { }
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(foo2,Decl(callSignaturesWithOptionalParameters2.ts,17,23),Decl(callSignaturesWithOptionalParameters2.ts,19,20),Decl(callSignaturesWithOptionalParameters2.ts,20,32))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,21,9))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,21,19))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var c: C;
|
2015-04-13 22:54:22 +02:00
|
|
|
>c : C, Symbol(c,Decl(callSignaturesWithOptionalParameters2.ts,24,3))
|
|
|
|
>C : C, Symbol(C,Decl(callSignaturesWithOptionalParameters2.ts,13,11))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
c.foo();
|
|
|
|
>c.foo() : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>c.foo : (x?: number) => any, Symbol(C.foo,Decl(callSignaturesWithOptionalParameters2.ts,15,9),Decl(callSignaturesWithOptionalParameters2.ts,16,20))
|
|
|
|
>c : C, Symbol(c,Decl(callSignaturesWithOptionalParameters2.ts,24,3))
|
|
|
|
>foo : (x?: number) => any, Symbol(C.foo,Decl(callSignaturesWithOptionalParameters2.ts,15,9),Decl(callSignaturesWithOptionalParameters2.ts,16,20))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
c.foo(1);
|
|
|
|
>c.foo(1) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>c.foo : (x?: number) => any, Symbol(C.foo,Decl(callSignaturesWithOptionalParameters2.ts,15,9),Decl(callSignaturesWithOptionalParameters2.ts,16,20))
|
|
|
|
>c : C, Symbol(c,Decl(callSignaturesWithOptionalParameters2.ts,24,3))
|
|
|
|
>foo : (x?: number) => any, Symbol(C.foo,Decl(callSignaturesWithOptionalParameters2.ts,15,9),Decl(callSignaturesWithOptionalParameters2.ts,16,20))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
c.foo2(1);
|
|
|
|
>c.foo2(1) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>c.foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(C.foo2,Decl(callSignaturesWithOptionalParameters2.ts,17,23),Decl(callSignaturesWithOptionalParameters2.ts,19,20),Decl(callSignaturesWithOptionalParameters2.ts,20,32))
|
|
|
|
>c : C, Symbol(c,Decl(callSignaturesWithOptionalParameters2.ts,24,3))
|
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(C.foo2,Decl(callSignaturesWithOptionalParameters2.ts,17,23),Decl(callSignaturesWithOptionalParameters2.ts,19,20),Decl(callSignaturesWithOptionalParameters2.ts,20,32))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
c.foo2(1, 2);
|
|
|
|
>c.foo2(1, 2) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>c.foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(C.foo2,Decl(callSignaturesWithOptionalParameters2.ts,17,23),Decl(callSignaturesWithOptionalParameters2.ts,19,20),Decl(callSignaturesWithOptionalParameters2.ts,20,32))
|
|
|
|
>c : C, Symbol(c,Decl(callSignaturesWithOptionalParameters2.ts,24,3))
|
|
|
|
>foo2 : { (x: number): any; (x: number, y?: number): any; }, Symbol(C.foo2,Decl(callSignaturesWithOptionalParameters2.ts,17,23),Decl(callSignaturesWithOptionalParameters2.ts,19,20),Decl(callSignaturesWithOptionalParameters2.ts,20,32))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
|
|
|
>2 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
interface I {
|
2015-04-13 22:54:22 +02:00
|
|
|
>I : I, Symbol(I,Decl(callSignaturesWithOptionalParameters2.ts,29,13))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
(x?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,32,5))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
(x?: number, y?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,33,5))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,33,16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(x: number, y?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,33,29),Decl(callSignaturesWithOptionalParameters2.ts,34,31))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,34,8))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,34,18))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(x: number, y?: number, z?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,33,29),Decl(callSignaturesWithOptionalParameters2.ts,34,31))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,35,8))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,35,18))
|
|
|
|
>z : number, Symbol(z,Decl(callSignaturesWithOptionalParameters2.ts,35,30))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var i: I;
|
2015-04-13 22:54:22 +02:00
|
|
|
>i : I, Symbol(i,Decl(callSignaturesWithOptionalParameters2.ts,38,3))
|
|
|
|
>I : I, Symbol(I,Decl(callSignaturesWithOptionalParameters2.ts,29,13))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
i();
|
|
|
|
>i() : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>i : I, Symbol(i,Decl(callSignaturesWithOptionalParameters2.ts,38,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
i(1);
|
|
|
|
>i(1) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>i : I, Symbol(i,Decl(callSignaturesWithOptionalParameters2.ts,38,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
i(1, 2);
|
|
|
|
>i(1, 2) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>i : I, Symbol(i,Decl(callSignaturesWithOptionalParameters2.ts,38,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
|
|
|
>2 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
i.foo(1);
|
|
|
|
>i.foo(1) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>i.foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(I.foo,Decl(callSignaturesWithOptionalParameters2.ts,33,29),Decl(callSignaturesWithOptionalParameters2.ts,34,31))
|
|
|
|
>i : I, Symbol(i,Decl(callSignaturesWithOptionalParameters2.ts,38,3))
|
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(I.foo,Decl(callSignaturesWithOptionalParameters2.ts,33,29),Decl(callSignaturesWithOptionalParameters2.ts,34,31))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
i.foo(1, 2);
|
|
|
|
>i.foo(1, 2) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>i.foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(I.foo,Decl(callSignaturesWithOptionalParameters2.ts,33,29),Decl(callSignaturesWithOptionalParameters2.ts,34,31))
|
|
|
|
>i : I, Symbol(i,Decl(callSignaturesWithOptionalParameters2.ts,38,3))
|
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(I.foo,Decl(callSignaturesWithOptionalParameters2.ts,33,29),Decl(callSignaturesWithOptionalParameters2.ts,34,31))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
|
|
|
>2 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
i.foo(1, 2, 3);
|
|
|
|
>i.foo(1, 2, 3) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>i.foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(I.foo,Decl(callSignaturesWithOptionalParameters2.ts,33,29),Decl(callSignaturesWithOptionalParameters2.ts,34,31))
|
|
|
|
>i : I, Symbol(i,Decl(callSignaturesWithOptionalParameters2.ts,38,3))
|
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(I.foo,Decl(callSignaturesWithOptionalParameters2.ts,33,29),Decl(callSignaturesWithOptionalParameters2.ts,34,31))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
|
|
|
>2 : number
|
|
|
|
>3 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var a: {
|
2015-04-13 22:54:22 +02:00
|
|
|
>a : { (x?: number): any; (x?: number, y?: number): any; foo(x: number, y?: number): any; foo(x: number, y?: number, z?: number): any; }, Symbol(a,Decl(callSignaturesWithOptionalParameters2.ts,46,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
(x?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,47,5))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
(x?: number, y?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,48,5))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,48,16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(x: number, y?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,48,29),Decl(callSignaturesWithOptionalParameters2.ts,49,31))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,49,8))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,49,18))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(x: number, y?: number, z?: number);
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,48,29),Decl(callSignaturesWithOptionalParameters2.ts,49,31))
|
|
|
|
>x : number, Symbol(x,Decl(callSignaturesWithOptionalParameters2.ts,50,8))
|
|
|
|
>y : number, Symbol(y,Decl(callSignaturesWithOptionalParameters2.ts,50,18))
|
|
|
|
>z : number, Symbol(z,Decl(callSignaturesWithOptionalParameters2.ts,50,30))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
a();
|
|
|
|
>a() : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>a : { (x?: number): any; (x?: number, y?: number): any; foo(x: number, y?: number): any; foo(x: number, y?: number, z?: number): any; }, Symbol(a,Decl(callSignaturesWithOptionalParameters2.ts,46,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
a(1);
|
|
|
|
>a(1) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>a : { (x?: number): any; (x?: number, y?: number): any; foo(x: number, y?: number): any; foo(x: number, y?: number, z?: number): any; }, Symbol(a,Decl(callSignaturesWithOptionalParameters2.ts,46,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
a(1, 2);
|
|
|
|
>a(1, 2) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>a : { (x?: number): any; (x?: number, y?: number): any; foo(x: number, y?: number): any; foo(x: number, y?: number, z?: number): any; }, Symbol(a,Decl(callSignaturesWithOptionalParameters2.ts,46,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
|
|
|
>2 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
a.foo(1);
|
|
|
|
>a.foo(1) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>a.foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,48,29),Decl(callSignaturesWithOptionalParameters2.ts,49,31))
|
|
|
|
>a : { (x?: number): any; (x?: number, y?: number): any; foo(x: number, y?: number): any; foo(x: number, y?: number, z?: number): any; }, Symbol(a,Decl(callSignaturesWithOptionalParameters2.ts,46,3))
|
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,48,29),Decl(callSignaturesWithOptionalParameters2.ts,49,31))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
a.foo(1, 2);
|
|
|
|
>a.foo(1, 2) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>a.foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,48,29),Decl(callSignaturesWithOptionalParameters2.ts,49,31))
|
|
|
|
>a : { (x?: number): any; (x?: number, y?: number): any; foo(x: number, y?: number): any; foo(x: number, y?: number, z?: number): any; }, Symbol(a,Decl(callSignaturesWithOptionalParameters2.ts,46,3))
|
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,48,29),Decl(callSignaturesWithOptionalParameters2.ts,49,31))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
|
|
|
>2 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
a.foo(1, 2, 3);
|
|
|
|
>a.foo(1, 2, 3) : any
|
2015-04-13 22:54:22 +02:00
|
|
|
>a.foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,48,29),Decl(callSignaturesWithOptionalParameters2.ts,49,31))
|
|
|
|
>a : { (x?: number): any; (x?: number, y?: number): any; foo(x: number, y?: number): any; foo(x: number, y?: number, z?: number): any; }, Symbol(a,Decl(callSignaturesWithOptionalParameters2.ts,46,3))
|
|
|
|
>foo : { (x: number, y?: number): any; (x: number, y?: number, z?: number): any; }, Symbol(foo,Decl(callSignaturesWithOptionalParameters2.ts,48,29),Decl(callSignaturesWithOptionalParameters2.ts,49,31))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
|
|
|
>2 : number
|
|
|
|
>3 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|