20 lines
No EOL
1,010 B
Text
20 lines
No EOL
1,010 B
Text
tests/cases/compiler/parameterPropertyInConstructor2.ts(3,5): error TS2394: Overload signature is not compatible with function implementation.
|
|
tests/cases/compiler/parameterPropertyInConstructor2.ts(3,17): error TS2369: A parameter property is only allowed in a constructor implementation.
|
|
tests/cases/compiler/parameterPropertyInConstructor2.ts(4,24): error TS2300: Duplicate identifier 'names'.
|
|
|
|
|
|
==== tests/cases/compiler/parameterPropertyInConstructor2.ts (3 errors) ====
|
|
module mod {
|
|
class Customers {
|
|
constructor(public names: string);
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2394: Overload signature is not compatible with function implementation.
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2369: A parameter property is only allowed in a constructor implementation.
|
|
constructor(public names: string, public ages: number) {
|
|
~~~~~
|
|
!!! error TS2300: Duplicate identifier 'names'.
|
|
}
|
|
}
|
|
}
|
|
|