Answer the question
In order to leave comments, you need to log in
Why does the IDE complain about duplicate code?
There are some very simple classes in a TypeScript project. All they do so far is take an object in the constructor and write some of its properties into this
. PhpStorm highlights the constructors of these classes with the message "Duplicated code fragment (6 lines long)" although the properties they work with are different:
I even tried to move the two properties to a common parent class, but it didn't work.
Who is the fool in this situation? Me or IDE? Perhaps I should somehow redo the constructors, but I have no idea how.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question