| ▲ | tresil 11 hours ago | |
To clarify, I’m not claiming that classes have no place in Typescript. What I’m saying is that many people coming from OOP backgrounds tend to have the mistaken belief that TypeScript is best written with that paradigm. While it can be in some cases, it should not be assumed to be the best way. In fact, the documentation linked above asserts that “free functions over data” are extremely powerful, and “tend to be the preferred model for writing programs in JavaScript.” | ||