TypeScript/tests/baselines/reference/constructorReturnsInvalidType.js
2014-07-12 17:30:19 -07:00

22 lines
330 B
JavaScript

//// [constructorReturnsInvalidType.ts]
class X {
constructor() {
return 1;
}
foo() { }
}
var x = new X();
//// [constructorReturnsInvalidType.js]
var X = (function () {
function X() {
return 1;
}
X.prototype.foo = function () {
};
return X;
})();
var x = new X();