DEV Community


Discussion on: Consuming APIs in Angular – The Model-Adapter Pattern

gabrieltaets profile image
Gabriel Taets

Just be careful with Object.assign() in that constructor. While you're telling Typescript that you'll be receiving a Partial as an argument, that is not validated in runtime. So you might have a Person object with more (or less) properties than expected, should your back-end misbehave for some reason.

Forem Open with the Forem app