Hi Jay Kim, thank you for reading the blog and leaving a comment. We are not using type in the new implementation.

New code
let offer = user.getOffer();
console.log(‘your offer is’, offer);
// makes payment or other activities
user.setOffer(UserOffer.goldOffer);

Old code:
let offer = user.getOffer();
console.log(‘your offer is’, offer);
// makes payment or other activities
user.setType(‘gold’);

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine