1 // Copyright 2020 Blue Static <https://www.bluestatic.org>
2 // This program is free software licensed under the GNU General Public License,
3 // version 3.0. The full text of the license can be found in LICENSE.txt.
4 // SPDX-License-Identifier: GPL-3.0-only
12 export default class Person {
13 private _name: string;
14 private _relation: Relation;
16 static joint = Symbol('Joint') as unknown as Person;
18 constructor(name: string, relation: Relation) {
20 this._relation = relation;
27 get relation(): Relation {
28 return this._relation;
31 static self(name: string): Person {
32 return new Person(name, Relation.Self);
35 static spouse(name: string): Person {
36 return new Person(name, Relation.Spouse);
39 static dependent(name: string): Person {
40 return new Person(name, Relation.Dependent);