Skip to content

Instantly share code, notes, and snippets.

@n8rzz
Created October 18, 2021 04:58
Show Gist options
  • Save n8rzz/4acafd294334be4ba19b62371232a53b to your computer and use it in GitHub Desktop.
Save n8rzz/4acafd294334be4ba19b62371232a53b to your computer and use it in GitHub Desktop.
Student.model.ts
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