When should you use classes?
As a rule of thumb, when you have a set of data with a specific structure and you want to perform specific methods on it, use a class. That is only valid, however, if you use multiple data structures in your code. If your whole code won’t ever deal with more than one structure.
Should I use classes in TypeScript?
When should you use classes in TypeScript They express the logic, methods, and properties these objects will inherit. In JS or TS, classes will not create a new data type in your application; you use it as object factories. When you need to write the logic that gives functionality to your app.