You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the decorated class with the normalize API.
@Entity({key: 'users'})classUser{publicreadonlyid: number;publicage: number;}// instantiate a User object (ignore id for now)constuser=newUser();// set age property of instantiated useruser.age=42;// normalize through prototype methodconstnormalizedProtoUser1=user.normalize();// internally calls normalizr.normalize(this, typeOfThis);// ... and with optional argconstnormalizedProtoUser2=user.normalize({age: 43});// normalize through static method with required data argconstnormalizedStaticUser=User.normalize({id: 1,age: 42});
Extend the decorated class with the normalize API.
Questions:
Feedback welcome!
The text was updated successfully, but these errors were encountered: