Created
October 18, 2021 04:58
-
-
Save n8rzz/4acafd294334be4ba19b62371232a53b to your computer and use it in GitHub Desktop.
Student.model.ts
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
export class StudentModel { | |
public age: number = -1; | |
public familyName: string = ""; | |
public givenName: string = ""; | |
get fullName(): string { | |
return `${this.givenName} ${this.familyName}`; | |
} | |
constructor(age: number, familyName: string, givenName: string) { | |
this.age = age; | |
this.familyName = familyName; | |
this.givenName = givenName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment