10 lines
274 B
TypeScript
10 lines
274 B
TypeScript
//// [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]
|
|
function foo(bar) { return bar; }
|
|
var x = foo({ a: 'foo' });
|