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 | var __spreadArrays = (this && this.__spreadArrays) || function () {
|
15 | for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
16 | for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
17 | for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
18 | r[k] = a[j];
|
19 | return r;
|
20 | };
|
21 | import { DocNode } from './DocNode';
|
22 | import { StringChecks } from '../parser/StringChecks';
|
23 | import { DocExcerpt, ExcerptKind } from './DocExcerpt';
|
24 |
|
25 |
|
26 |
|
27 | var DocInlineTagBase = (function (_super) {
|
28 | __extends(DocInlineTagBase, _super);
|
29 | |
30 |
|
31 |
|
32 |
|
33 | function DocInlineTagBase(parameters) {
|
34 | var _this = _super.call(this, parameters) || this;
|
35 | StringChecks.validateTSDocTagName(parameters.tagName);
|
36 | if (DocNode.isParsedParameters(parameters)) {
|
37 | _this._openingDelimiterExcerpt = new DocExcerpt({
|
38 | configuration: _this.configuration,
|
39 | excerptKind: ExcerptKind.InlineTag_OpeningDelimiter,
|
40 | content: parameters.openingDelimiterExcerpt
|
41 | });
|
42 | _this._tagNameExcerpt = new DocExcerpt({
|
43 | configuration: _this.configuration,
|
44 | excerptKind: ExcerptKind.InlineTag_TagName,
|
45 | content: parameters.tagNameExcerpt
|
46 | });
|
47 | if (parameters.spacingAfterTagNameExcerpt) {
|
48 | _this._spacingAfterTagNameExcerpt = new DocExcerpt({
|
49 | configuration: _this.configuration,
|
50 | excerptKind: ExcerptKind.Spacing,
|
51 | content: parameters.spacingAfterTagNameExcerpt
|
52 | });
|
53 | }
|
54 | _this._closingDelimiterExcerpt = new DocExcerpt({
|
55 | configuration: _this.configuration,
|
56 | excerptKind: ExcerptKind.InlineTag_ClosingDelimiter,
|
57 | content: parameters.closingDelimiterExcerpt
|
58 | });
|
59 | }
|
60 | _this._tagName = parameters.tagName;
|
61 | _this._tagNameWithUpperCase = parameters.tagName.toUpperCase();
|
62 | return _this;
|
63 | }
|
64 | Object.defineProperty(DocInlineTagBase.prototype, "tagName", {
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | get: function () {
|
74 | return this._tagName;
|
75 | },
|
76 | enumerable: false,
|
77 | configurable: true
|
78 | });
|
79 | Object.defineProperty(DocInlineTagBase.prototype, "tagNameWithUpperCase", {
|
80 | |
81 |
|
82 |
|
83 |
|
84 | get: function () {
|
85 | return this._tagNameWithUpperCase;
|
86 | },
|
87 | enumerable: false,
|
88 | configurable: true
|
89 | });
|
90 |
|
91 | DocInlineTagBase.prototype.onGetChildNodes = function () {
|
92 | return __spreadArrays([
|
93 | this._openingDelimiterExcerpt,
|
94 | this._tagNameExcerpt,
|
95 | this._spacingAfterTagNameExcerpt
|
96 | ], this.getChildNodesForContent(), [
|
97 | this._closingDelimiterExcerpt
|
98 | ]);
|
99 | };
|
100 | return DocInlineTagBase;
|
101 | }(DocNode));
|
102 | export { DocInlineTagBase };
|
103 |
|
\ | No newline at end of file |