34 lines
467 B
JavaScript
34 lines
467 B
JavaScript
//// [overload2.ts]
|
|
enum A { }
|
|
enum B { }
|
|
|
|
function foo(a: A);
|
|
function foo(b: B);
|
|
// should be ok
|
|
function foo(x: number) {
|
|
}
|
|
|
|
class C { }
|
|
function foo1(a: A);
|
|
function foo1(c: C);
|
|
// should be ok
|
|
function foo1(x: number) {
|
|
}
|
|
|
|
|
|
//// [overload2.js]
|
|
var A;
|
|
(function (A) {
|
|
})(A || (A = {}));
|
|
var B;
|
|
(function (B) {
|
|
})(B || (B = {}));
|
|
function foo(x) {
|
|
}
|
|
var C = (function () {
|
|
function C() {
|
|
}
|
|
return C;
|
|
})();
|
|
function foo1(x) {
|
|
}
|