"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const immutable_1 = __importDefault(require("immutable")); const github_slugid_1 = __importDefault(require("github-slugid")); /* A definition represents an entry in the glossary */ class GlossaryEntry extends immutable_1.default.Record({ name: String(), description: String() }) { getName() { return this.get("name"); } getDescription() { return this.get("description"); } /** Get identifier for this entry */ getID() { return GlossaryEntry.nameToID(this.getName()); } /** Normalize a glossary entry name into a unique id */ static nameToID(name) { return (0, github_slugid_1.default)(name); } } exports.default = GlossaryEntry;