mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
813 B
Plaintext
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;
|
|
}
|
|
}
|
|
|