12 lines
No EOL
326 B
Text
12 lines
No EOL
326 B
Text
==== tests/cases/compiler/constructorReturnsInvalidType.ts (1 errors) ====
|
|
class X {
|
|
constructor() {
|
|
return 1;
|
|
~
|
|
!!! Return type of constructor signature must be assignable to the instance type of the class
|
|
}
|
|
foo() { }
|
|
}
|
|
|
|
var x = new X();
|
|
|