DEV Community

Francesco Marchioni
Francesco Marchioni

Posted on

Angular Model definition and DTO

Hi all,
I'd like to learn from Angular developers which is a common approach for defining the Typescript Model objects.

Since these Models map the server-side DTO objects, which in turn map the Database schema, is there a tool or best practice to keep all these objects in sync ?

As beginner, I'm simply replicating the DTO objects in equivalent typescript *.model.ts files. I think this might not work well at scale.

Thanks!
Francesco

Top comments (1)

Collapse
 
dertuerke profile image
dertuerke

Not really. If ur api can outputs swagger file then it is possible to sync it with your models.