DEV Community

Discussion on: Language Features: Best and Worst

Collapse
 
pretzelhands profile image
pretzelhands

That's the gist of it yes. I think you could implement the same thing with tagged template literals in JS, but Go just offers it natively. 🤓

Thread Thread
 
vberlier profile image
Valentin Berlier

In js you would use decorators, which are native langage features:

class Invitation {
  @Serialize({ json: 'invitationToken', db: 'invitation_token' })
  token
}