Our great sponsors
-
class-transformer
Decorator-based transformation, serialization, and deserialization between objects and classes.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
In addition to all the other good advice in this thread, if you find yourself wanting to do this type of thing a lot (especially moving from plain JS objects to TS classes with transforms) I find https://github.com/typestack/class-transformer very useful.
There's also https://github.com/typestack/class-validator which is specifically for object validation.