TypeScript/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt
2014-07-24 19:39:50 -07:00

19 lines
541 B
Plaintext

==== tests/cases/compiler/inheritedConstructorWithRestParams.ts (2 errors) ====
class Base {
constructor(...a: string[]) { }
}
class Derived extends Base { }
// Ok
new Derived("", "");
new Derived("");
new Derived();
// Errors
new Derived("", 3);
~
!!! Argument of type 'number' is not assignable to parameter of type 'string'.
new Derived(3);
~
!!! Argument of type 'number' is not assignable to parameter of type 'string'.