We write many thousands of lines of TS code and, at least on the back end, we don't use the class keyword except in very rare cases where the class will be a singleton instance.
We don't go as far as using FP libraries and trying to do full FP, however we write all pure functions where possible, and use a few other really useful FP techniques to make code easy to write, test, and maintain.
We write OOP in the truest sense of the term, because we use objects and message passing, but we don't write anything like what most people consider OOP. The tight coupling with class inheritance is just terrible.
In any case, TS is not an OOP language. Most languages don't push you into a single paradigm and TS is no different.
I'm also not sure why people think FP is harder with TS than JS. There are generics which help with some of the problems I've seen listed.
I am Software Developer, currently interested in static type languages (TypeScript, Elm, ReScript) mostly in the frontend land, but working actively in Python also. I am available for mentoring.
We write many thousands of lines of TS code and, at least on the back end, we don't use the class keyword except in very rare cases where the class will be a singleton instance.
We don't go as far as using FP libraries and trying to do full FP, however we write all pure functions where possible, and use a few other really useful FP techniques to make code easy to write, test, and maintain.
We write OOP in the truest sense of the term, because we use objects and message passing, but we don't write anything like what most people consider OOP. The tight coupling with class inheritance is just terrible.
In any case, TS is not an OOP language. Most languages don't push you into a single paradigm and TS is no different.
I'm also not sure why people think FP is harder with TS than JS. There are generics which help with some of the problems I've seen listed.
Thanks for this comment. That is great. But about why it is harder, grab this code from Ramda
pipe
types:Like this type? Take them more here - Ramda types 😉
🤣