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