TypeScript/tests/baselines/reference/constructorReturnsInvalidType.js
2015-02-06 18:45:09 -08:00

21 lines
325 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();