{"size": 865, "ext": "js", "max_stars_repo_path": "tests/baselines/reference/functionOverloads44.js", "max_stars_repo_name": "nilamjadhav/TypeScript", "max_stars_repo_stars_event_min_datetime": "2015-01-01T02:37:27.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-06T20:38:53.000Z", "max_issues_repo_path": "tests/baselines/reference/functionOverloads44.js", "max_issues_repo_name": "nilamjadhav/TypeScript", "max_issues_repo_issues_event_min_datetime": "2015-01-01T13:57:03.000Z", "max_issues_repo_issues_event_max_datetime": "2019-05-06T20:40:00.000Z", "max_forks_repo_path": "tests/baselines/reference/functionOverloads44.js", "max_forks_repo_name": "nilamjadhav/TypeScript", "max_forks_repo_forks_event_min_datetime": "2015-01-05T03:29:29.000Z", "max_forks_repo_forks_event_max_datetime": "2019-05-06T14:37:49.000Z"}
{"max_stars_count": 49134, "max_issues_count": 26488, "max_forks_count": 8518, "avg_line_length": 22.7631578947, "max_line_length": 50, "alphanum_fraction": 0.5653179191}
//// [functionOverloads44.ts]
interface Animal { animal }
interface Dog extends Animal { dog }
interface Cat extends Animal { cat }

function foo1(bar: { a:number }[]): Dog;
function foo1(bar: { a:string }[]): Animal;
function foo1([x]: { a:number | string }[]): Dog {
    return undefined;
}

function foo2(bar: { a:number }[]): Cat;
function foo2(bar: { a:string }[]): Cat | Dog;
function foo2([x]: { a:number | string }[]): Cat {
    return undefined;
}


var x1 = foo1([{a: "str"}]);
var y1 = foo1([{a: 100}]);

var x2 = foo2([{a: "str"}]);
var y2 = foo2([{a: 100}]);

//// [functionOverloads44.js]
function foo1(_a) {
    var x = _a[0];
    return undefined;
}
function foo2(_a) {
    var x = _a[0];
    return undefined;
}
var x1 = foo1([{ a: "str" }]);
var y1 = foo1([{ a: 100 }]);
var x2 = foo2([{ a: "str" }]);
var y2 = foo2([{ a: 100 }]);
