1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = function (d, b) {
|
4 | extendStatics = Object.setPrototypeOf ||
|
5 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7 | return extendStatics(d, b);
|
8 | };
|
9 | return function (d, b) {
|
10 | extendStatics(d, b);
|
11 | function __() { this.constructor = d; }
|
12 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13 | };
|
14 | })();
|
15 | Object.defineProperty(exports, "__esModule", { value: true });
|
16 | exports.DocBlockTag = void 0;
|
17 | var DocNode_1 = require("./DocNode");
|
18 | var StringChecks_1 = require("../parser/StringChecks");
|
19 | var DocExcerpt_1 = require("./DocExcerpt");
|
20 |
|
21 |
|
22 |
|
23 | var DocBlockTag = (function (_super) {
|
24 | __extends(DocBlockTag, _super);
|
25 | |
26 |
|
27 |
|
28 |
|
29 | function DocBlockTag(parameters) {
|
30 | var _this = _super.call(this, parameters) || this;
|
31 | StringChecks_1.StringChecks.validateTSDocTagName(parameters.tagName);
|
32 | _this._tagName = parameters.tagName;
|
33 | _this._tagNameWithUpperCase = parameters.tagName.toUpperCase();
|
34 | if (DocNode_1.DocNode.isParsedParameters(parameters)) {
|
35 | _this._tagNameExcerpt = new DocExcerpt_1.DocExcerpt({
|
36 | configuration: _this.configuration,
|
37 | excerptKind: DocExcerpt_1.ExcerptKind.BlockTag,
|
38 | content: parameters.tagNameExcerpt
|
39 | });
|
40 | }
|
41 | return _this;
|
42 | }
|
43 | Object.defineProperty(DocBlockTag.prototype, "kind", {
|
44 |
|
45 | get: function () {
|
46 | return DocNode_1.DocNodeKind.BlockTag;
|
47 | },
|
48 | enumerable: false,
|
49 | configurable: true
|
50 | });
|
51 | Object.defineProperty(DocBlockTag.prototype, "tagName", {
|
52 | |
53 |
|
54 |
|
55 |
|
56 | get: function () {
|
57 | return this._tagName;
|
58 | },
|
59 | enumerable: false,
|
60 | configurable: true
|
61 | });
|
62 | Object.defineProperty(DocBlockTag.prototype, "tagNameWithUpperCase", {
|
63 | |
64 |
|
65 |
|
66 |
|
67 | get: function () {
|
68 | return this._tagNameWithUpperCase;
|
69 | },
|
70 | enumerable: false,
|
71 | configurable: true
|
72 | });
|
73 |
|
74 | DocBlockTag.prototype.onGetChildNodes = function () {
|
75 | return [this._tagNameExcerpt];
|
76 | };
|
77 | DocBlockTag.prototype.getTokenSequence = function () {
|
78 | if (!this._tagNameExcerpt) {
|
79 | throw new Error('DocBlockTag.getTokenSequence() failed because this object did not originate from a parsed input');
|
80 | }
|
81 | return this._tagNameExcerpt.content;
|
82 | };
|
83 | return DocBlockTag;
|
84 | }(DocNode_1.DocNode));
|
85 | exports.DocBlockTag = DocBlockTag;
|
86 |
|
\ | No newline at end of file |