Created
January 16, 2022 07:50
-
-
Save FermiDirak/08cd3e461d767e94ee1d8bbba3113d0d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// UserModel.ts | |
type UserModel = { /* ... */ } | |
namespace UserService { | |
function fullName(): string { /* ... */ }; | |
// ... | |
} | |
// HappyBirthdayService.ts | |
function sendMessage(sessionContext: &SessionContext) { | |
let message = happyBirthdayMessage(sessionContext.user); | |
sendEmail(user.email, message); | |
} | |
function happyBirthdayMessage(user: UserModel) -> String { | |
return `Happy Birthday, ${UserService.fullName(user)} 🎉`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment