TypeScript/tests/baselines/reference/constructorReturnsInvalidType.errors.txt
2014-09-11 16:11:08 -07:00

12 lines
340 B
Plaintext

==== tests/cases/compiler/constructorReturnsInvalidType.ts (1 errors) ====
class X {
constructor() {
return 1;
~
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
}
foo() { }
}
var x = new X();