It's a very clever alternative implementation of this pattern. I like how this approach binds the adaptation code to the model class. Also saves an import statement, and the DI boilerplate. :-) I'd definitely try this out in my next Angular projects!
Indeed. Map statement reads really nicely. 👌
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.