TypeScript/tests/baselines/reference/constructorOverloads8.errors.txt
2014-07-12 17:30:19 -07:00

18 lines
587 B
Plaintext

==== tests/cases/compiler/constructorOverloads8.ts (1 errors) ====
class C {
constructor(x) { }
constructor(y, x) { } // illegal, 2 constructor implementations
~~~~~~~~~~~~~~~~~~~~~
!!! Multiple constructor implementations are not allowed.
}
class D {
constructor(x: number);
constructor(y: string); // legal, overload signatures for 1 implementation
constructor(x) { }
}
interface I {
new (x);
new (x, y); // legal, overload signatures for (presumably) 1 implementation
}