Files
tsgo/testdata/baselines/reference/submodule/compiler/functionWithSameNameAsField.errors.txt

20 lines
813 B
Plaintext

functionWithSameNameAsField.ts(2,12): error TS2300: Duplicate identifier 'total'.
functionWithSameNameAsField.ts(2,12): error TS2564: Property 'total' has no initializer and is not definitely assigned in the constructor.
functionWithSameNameAsField.ts(3,12): error TS2300: Duplicate identifier 'total'.
==== functionWithSameNameAsField.ts (3 errors) ====
class TestProgressBar {
public total: number;
~~~~~
!!! error TS2300: Duplicate identifier 'total'.
~~~~~
!!! error TS2564: Property 'total' has no initializer and is not definitely assigned in the constructor.
public total(total: number) {
~~~~~
!!! error TS2300: Duplicate identifier 'total'.
this.total = total;
return this;
}
}