Closed AKlaus closed 4 years ago
I have being doing heavy TypeScript programming with jQuery and Angular 2+ since 2012 in complex business fat clients and had yet found a situation in which I need to use DTO class. You probably had known that interface won't yield a footprint in the JavaScript output, but class yield footprint in the JS.
If you google around, you may find many good posts discussing interface vs class in TypeScript for DTO. Or you may present your case (customised serialisation/deserialisation? with examples) of using DTO class in this post or the other forum to see if there could be some legitimate case that DTO class is a must.
While both approaches could have their own pros and cons depending on the contexts. However, I would list 2 factors here.
Remarks: React is apparently not in favor of namespace, however, their development team seemed to be changing their mind as of one year ago. I might later revisit React. Or, if you are familiar with React, you may try to write a plug-in for React.
no feedback
Is there a way to split generated classes into multiple files? Ideally to have one class per file. I'm interested in TypeScript files in particular.
Have another question. Generated TypeScript POCOs are interfaces. Is there a way to generate them as classes with customised serialisation/deserialisation, so complex objects get converted to/from string nicely?