TypeScript/tests/baselines/reference/constructorReturnsInvalidType.js

22 lines
330 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [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();