Inspectopedia
 
2024.3

Assigned constructor field parameter

Warning
Code Style
New
Last modified: 03 December 2024

Reports a common mistake in TypeScript code, when a class field is declared as a constructor parameter, and then this parameter is assigned.

In this case, the corresponding field won't be assigned, only the local parameter value is modified.