igir
Version:
🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.
30 lines (29 loc) • 611 B
JavaScript
class Parent {
parentGame;
allGames;
constructor(parentGame, allGames) {
this.parentGame = parentGame;
if (allGames === void 0) {
this.allGames = [parentGame];
} else {
this.allGames = Array.isArray(allGames) ? allGames : [allGames];
}
}
// Property getters
getName() {
return this.parentGame.getName();
}
getGames() {
return this.allGames;
}
/**
* Add a child {@link Game} to this {@link Parent}'s list of {@link Game}s.
*/
addChild(child) {
this.allGames.push(child);
}
}
export {
Parent as default
};
//# sourceMappingURL=parent.js.map