TypeScript/tests/baselines/reference/requiredInitializedParameter3.js
Jason Freeman 628d63cf75 Add tests
2015-07-24 14:59:59 -07:00

28 lines
500 B
TypeScript

//// [requiredInitializedParameter3.ts]
interface I1 {
method();
}
class C1 implements I1 {
method(a = 0, b?) { }
}
//// [requiredInitializedParameter3.js]
var C1 = (function () {
function C1() {
}
C1.prototype.method = function (a, b) {
if (a === void 0) { a = 0; }
};
return C1;
})();
//// [requiredInitializedParameter3.d.ts]
interface I1 {
method(): any;
}
declare class C1 implements I1 {
method(a?: number, b?: any): void;
}