DEV Community


Discussion on: No, TypeScript is not OOP version of JavaScript

szabikr profile image

Great article! Hope many people get to read this.

The project that I'm currently working on is in TypeScript and it uses classes and functions alongside each other which works best for us. Using classes is a very good way to introduce dependency injection and make testability of complex components easier. But wherever possible we try to use simple pure functions.

Being extremely cautious with inheritance and try to avoid it in the majority of the cases.