Created
October 9, 2019 22:31
-
-
Save IhsanMujdeci/830d7a548e9c83ed2a18733d381c7d90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import request from 'request-promise' | |
class User{ | |
emailUrl = "emailserver.com/api" | |
constructor( | |
private firstName: string, | |
private lastName: string, | |
private age: number, | |
private email: string, | |
){} | |
sendMotivationalEmail(){ | |
return request(this.emailUrl, {email: this.email, body: `Hey ${this.firstName} ${this.lastName} u have lived ${this.age} beautiful years on this planet`}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment