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

15 lines
564 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/parameterPropertyInConstructor2.ts (3 errors) ====
module mod {
class Customers {
constructor(public names: string);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Overload signature is not compatible with function implementation.
~~~~~~~~~~~~~~~~~~~~
!!! A parameter property is only allowed in a constructor implementation.
constructor(public names: string, public ages: number) {
~~~~~
!!! Duplicate identifier 'names'.
}
}
}