2014-07-13 01:04:16 +02:00
|
|
|
//// [functionOverloads36.ts]
|
|
|
|
function foo(bar:{a:number;}):number;
|
|
|
|
function foo(bar:{a:string;}):string;
|
|
|
|
function foo(bar:{a:any;}):any{ return bar }
|
|
|
|
var x = foo({a:'foo'});
|
|
|
|
|
|
|
|
|
|
|
|
//// [functionOverloads36.js]
|
2015-02-07 05:03:24 +01:00
|
|
|
function foo(bar) { return bar; }
|
2014-07-13 01:04:16 +02:00
|
|
|
var x = foo({ a: 'foo' });
|