23 lines
887 B
Plaintext
23 lines
887 B
Plaintext
tests/cases/compiler/inheritedConstructorWithRestParams.ts(13,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
|
|
tests/cases/compiler/inheritedConstructorWithRestParams.ts(14,13): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
|
|
|
|
|
|
==== 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);
|
|
~
|
|
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
|
|
new Derived(3);
|
|
~
|
|
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. |