Answer the question
In order to leave comments, you need to log in
Don't you think Utility types code is a smell?
Typescript has such a thing as utility types . It is very convenient, for example, to take and drop several properties from the interface or make the properties optional .
On the other hand, in other languages (Java, C#) there are no such types, and people somehow get out, for example, by separating the interface.
The question is - often the use of utility types can be a smell in the code. Do you consider the use of utility types to be a SOLID incompatibility and a smell in the code, or vice versa, a good sign of deep knowledge of typescript?
Do you use them in your work or do you try to solve the problem with classical methods?
Answer the question
In order to leave comments, you need to log in
It all depends on how you approach typescript: if it is a separate language for you and you came to it from java \ c # - then it's really worth avoiding all this "horror" and writing "strictly"; if typescript is for you an add-on over javascript, the purpose of which is to simplify writing code and reduce the number of errors, while maintaining the "flexibility" and "variability" of javascript - then you should use everything that is.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question