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
The text was updated successfully, but these errors were encountered:
krishnauppili
changed the title
Is it possible to provide dynamic model type as parameter to @Serializable property?
Is it possible to provide dynamic model type as parameter to @SerializableProperty()?
Dec 9, 2019
@serialize({})
export class SocialEntity extends Serializable{
@SerializeProperty({ map: 'entity_type' })
public entityType:string;
@SerializeProperty({
map: 'entity',
type:entityType == 'user'?UserProfile:entityType=='team'?TeamProfile:PageProfile
})
public entity:UserProfile | TeamProfile | PageProfile;
}
Something like this?
The text was updated successfully, but these errors were encountered: