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