9 private _relation: Relation;
11 constructor(name: string, relation: Relation) {
13 this._relation = relation;
20 get relation(): Relation {
21 return this._relation;
24 static self(name: string): Person {
25 return new Person(name, Relation.Self);
28 static spouse(name: string): Person {
29 return new Person(name, Relation.Spouse);
32 static dependent(name: string): Person {
33 return new Person(name, Relation.Dependent);