UNPKG

my-example-types

Version:

Spartans never die. They just go missing in action.

52 lines (51 loc) 2.25 kB
"use strict"; var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _SpartanI_boren, _SpartanII_armor; Object.defineProperty(exports, "__esModule", { value: true }); exports.spartans = exports.SpartanII = exports.SpartanI = void 0; class SpartanI { constructor(name) { _SpartanI_boren.set(this, void 0); this.label = "ORION"; __classPrivateFieldSet(this, _SpartanI_boren, false, "f"); this.name = name; } hasBorens() { return __classPrivateFieldGet(this, _SpartanI_boren, "f"); } falsifyRecords() { __classPrivateFieldSet(this, _SpartanI_boren, true, "f"); } } exports.SpartanI = SpartanI; _SpartanI_boren = new WeakMap(); class SpartanII { constructor(name, tag) { _SpartanII_armor.set(this, void 0); this.label = "II"; this.name = name; this.tag = tag; } getArmor() { return __classPrivateFieldGet(this, _SpartanII_armor, "f"); } setArmor(armor) { __classPrivateFieldSet(this, _SpartanII_armor, armor, "f"); } } exports.SpartanII = SpartanII; _SpartanII_armor = new WeakMap(); exports.spartans = [ new SpartanI("Avery Junior Johnson"), new SpartanII("John", 117), ];