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 | var __spreadArrays = (this && this.__spreadArrays) || function () {
|
16 | for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
17 | for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
18 | for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
19 | r[k] = a[j];
|
20 | return r;
|
21 | };
|
22 | Object.defineProperty(exports, "__esModule", { value: true });
|
23 | exports.DocComment = void 0;
|
24 | var DocNode_1 = require("./DocNode");
|
25 | var DocSection_1 = require("./DocSection");
|
26 | var StandardModifierTagSet_1 = require("../details/StandardModifierTagSet");
|
27 | var StringBuilder_1 = require("../emitters/StringBuilder");
|
28 | var DocParamCollection_1 = require("./DocParamCollection");
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | var DocComment = (function (_super) {
|
34 | __extends(DocComment, _super);
|
35 | |
36 |
|
37 |
|
38 |
|
39 | function DocComment(parameters) {
|
40 | var _this = _super.call(this, parameters) || this;
|
41 | _this.summarySection = new DocSection_1.DocSection({ configuration: _this.configuration });
|
42 | _this.remarksBlock = undefined;
|
43 | _this.privateRemarks = undefined;
|
44 | _this.deprecatedBlock = undefined;
|
45 | _this.params = new DocParamCollection_1.DocParamCollection({ configuration: _this.configuration });
|
46 | _this.typeParams = new DocParamCollection_1.DocParamCollection({ configuration: _this.configuration });
|
47 | _this.returnsBlock = undefined;
|
48 | _this.modifierTagSet = new StandardModifierTagSet_1.StandardModifierTagSet();
|
49 | _this._seeBlocks = [];
|
50 | _this._customBlocks = [];
|
51 | return _this;
|
52 | }
|
53 | Object.defineProperty(DocComment.prototype, "kind", {
|
54 |
|
55 | get: function () {
|
56 | return DocNode_1.DocNodeKind.Comment;
|
57 | },
|
58 | enumerable: false,
|
59 | configurable: true
|
60 | });
|
61 | Object.defineProperty(DocComment.prototype, "seeBlocks", {
|
62 | |
63 |
|
64 |
|
65 | get: function () {
|
66 | return this._seeBlocks;
|
67 | },
|
68 | enumerable: false,
|
69 | configurable: true
|
70 | });
|
71 | Object.defineProperty(DocComment.prototype, "customBlocks", {
|
72 | |
73 |
|
74 |
|
75 | get: function () {
|
76 | return this._customBlocks;
|
77 | },
|
78 | enumerable: false,
|
79 | configurable: true
|
80 | });
|
81 | |
82 |
|
83 |
|
84 |
|
85 | DocComment.prototype._appendSeeBlock = function (block) {
|
86 | this._seeBlocks.push(block);
|
87 | };
|
88 | |
89 |
|
90 |
|
91 | DocComment.prototype.appendCustomBlock = function (block) {
|
92 | this._customBlocks.push(block);
|
93 | };
|
94 |
|
95 | DocComment.prototype.onGetChildNodes = function () {
|
96 | return __spreadArrays([
|
97 | this.summarySection,
|
98 | this.remarksBlock,
|
99 | this.privateRemarks,
|
100 | this.deprecatedBlock,
|
101 | this.params.count > 0 ? this.params : undefined,
|
102 | this.typeParams.count > 0 ? this.typeParams : undefined,
|
103 | this.returnsBlock
|
104 | ], this.customBlocks, this.seeBlocks, [
|
105 | this.inheritDocTag
|
106 | ], this.modifierTagSet.nodes);
|
107 | };
|
108 | |
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 | DocComment.prototype.emitAsTsdoc = function () {
|
121 | var stringBuilder = new StringBuilder_1.StringBuilder();
|
122 |
|
123 | var emitter = new TSDocEmitter_1.TSDocEmitter();
|
124 | emitter.renderComment(stringBuilder, this);
|
125 | return stringBuilder.toString();
|
126 | };
|
127 | return DocComment;
|
128 | }(DocNode_1.DocNode));
|
129 | exports.DocComment = DocComment;
|
130 |
|
131 | var TSDocEmitter_1 = require("../emitters/TSDocEmitter");
|
132 |
|
\ | No newline at end of file |