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