TypeScript/tests/baselines/reference/constructorReturnsInvalidType.errors.txt

15 lines
510 B
Plaintext
Raw Normal View History

tests/cases/compiler/constructorReturnsInvalidType.ts(3,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
2014-07-13 01:04:16 +02:00
==== 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
2014-07-13 01:04:16 +02:00
}
foo() { }
}
var x = new X();