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 | Object.defineProperty(exports, "__esModule", { value: true });
|
16 | exports.DocParamBlock = void 0;
|
17 | var DocNode_1 = require("./DocNode");
|
18 | var DocBlock_1 = require("./DocBlock");
|
19 | var DocExcerpt_1 = require("./DocExcerpt");
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | var DocParamBlock = (function (_super) {
|
25 | __extends(DocParamBlock, _super);
|
26 | |
27 |
|
28 |
|
29 |
|
30 | function DocParamBlock(parameters) {
|
31 | var _this = _super.call(this, parameters) || this;
|
32 | _this._parameterName = parameters.parameterName;
|
33 | if (DocNode_1.DocNode.isParsedParameters(parameters)) {
|
34 | if (parameters.spacingBeforeParameterNameExcerpt) {
|
35 | _this._spacingBeforeParameterNameExcerpt = new DocExcerpt_1.DocExcerpt({
|
36 | configuration: _this.configuration,
|
37 | excerptKind: DocExcerpt_1.ExcerptKind.Spacing,
|
38 | content: parameters.spacingBeforeParameterNameExcerpt
|
39 | });
|
40 | }
|
41 | if (parameters.unsupportedJsdocTypeBeforeParameterNameExcerpt) {
|
42 | _this._unsupportedJsdocTypeBeforeParameterNameExcerpt = new DocExcerpt_1.DocExcerpt({
|
43 | configuration: _this.configuration,
|
44 | excerptKind: DocExcerpt_1.ExcerptKind.NonstandardText,
|
45 | content: parameters.unsupportedJsdocTypeBeforeParameterNameExcerpt
|
46 | });
|
47 | }
|
48 | if (parameters.unsupportedJsdocOptionalNameOpenBracketExcerpt) {
|
49 | _this._unsupportedJsdocOptionalNameOpenBracketExcerpt = new DocExcerpt_1.DocExcerpt({
|
50 | configuration: _this.configuration,
|
51 | excerptKind: DocExcerpt_1.ExcerptKind.NonstandardText,
|
52 | content: parameters.unsupportedJsdocOptionalNameOpenBracketExcerpt
|
53 | });
|
54 | }
|
55 | _this._parameterNameExcerpt = new DocExcerpt_1.DocExcerpt({
|
56 | configuration: _this.configuration,
|
57 | excerptKind: DocExcerpt_1.ExcerptKind.ParamBlock_ParameterName,
|
58 | content: parameters.parameterNameExcerpt
|
59 | });
|
60 | if (parameters.unsupportedJsdocOptionalNameRestExcerpt) {
|
61 | _this._unsupportedJsdocOptionalNameRestExcerpt = new DocExcerpt_1.DocExcerpt({
|
62 | configuration: _this.configuration,
|
63 | excerptKind: DocExcerpt_1.ExcerptKind.NonstandardText,
|
64 | content: parameters.unsupportedJsdocOptionalNameRestExcerpt
|
65 | });
|
66 | }
|
67 | if (parameters.spacingAfterParameterNameExcerpt) {
|
68 | _this._spacingAfterParameterNameExcerpt = new DocExcerpt_1.DocExcerpt({
|
69 | configuration: _this.configuration,
|
70 | excerptKind: DocExcerpt_1.ExcerptKind.Spacing,
|
71 | content: parameters.spacingAfterParameterNameExcerpt
|
72 | });
|
73 | }
|
74 | if (parameters.unsupportedJsdocTypeAfterParameterNameExcerpt) {
|
75 | _this._unsupportedJsdocTypeAfterParameterNameExcerpt = new DocExcerpt_1.DocExcerpt({
|
76 | configuration: _this.configuration,
|
77 | excerptKind: DocExcerpt_1.ExcerptKind.NonstandardText,
|
78 | content: parameters.unsupportedJsdocTypeAfterParameterNameExcerpt
|
79 | });
|
80 | }
|
81 | if (parameters.hyphenExcerpt) {
|
82 | _this._hyphenExcerpt = new DocExcerpt_1.DocExcerpt({
|
83 | configuration: _this.configuration,
|
84 | excerptKind: DocExcerpt_1.ExcerptKind.ParamBlock_Hyphen,
|
85 | content: parameters.hyphenExcerpt
|
86 | });
|
87 | }
|
88 | if (parameters.spacingAfterHyphenExcerpt) {
|
89 | _this._spacingAfterHyphenExcerpt = new DocExcerpt_1.DocExcerpt({
|
90 | configuration: _this.configuration,
|
91 | excerptKind: DocExcerpt_1.ExcerptKind.Spacing,
|
92 | content: parameters.spacingAfterHyphenExcerpt
|
93 | });
|
94 | }
|
95 | if (parameters.unsupportedJsdocTypeAfterHyphenExcerpt) {
|
96 | _this._unsupportedJsdocTypeAfterHyphenExcerpt = new DocExcerpt_1.DocExcerpt({
|
97 | configuration: _this.configuration,
|
98 | excerptKind: DocExcerpt_1.ExcerptKind.NonstandardText,
|
99 | content: parameters.unsupportedJsdocTypeAfterHyphenExcerpt
|
100 | });
|
101 | }
|
102 | }
|
103 | return _this;
|
104 | }
|
105 | Object.defineProperty(DocParamBlock.prototype, "kind", {
|
106 |
|
107 | get: function () {
|
108 | return DocNode_1.DocNodeKind.ParamBlock;
|
109 | },
|
110 | enumerable: false,
|
111 | configurable: true
|
112 | });
|
113 | Object.defineProperty(DocParamBlock.prototype, "parameterName", {
|
114 | |
115 |
|
116 |
|
117 |
|
118 | get: function () {
|
119 | return this._parameterName;
|
120 | },
|
121 | enumerable: false,
|
122 | configurable: true
|
123 | });
|
124 |
|
125 | DocParamBlock.prototype.onGetChildNodes = function () {
|
126 | return [
|
127 | this.blockTag,
|
128 | this._spacingBeforeParameterNameExcerpt,
|
129 | this._unsupportedJsdocTypeBeforeParameterNameExcerpt,
|
130 | this._unsupportedJsdocOptionalNameOpenBracketExcerpt,
|
131 | this._parameterNameExcerpt,
|
132 | this._unsupportedJsdocOptionalNameRestExcerpt,
|
133 | this._spacingAfterParameterNameExcerpt,
|
134 | this._unsupportedJsdocTypeAfterParameterNameExcerpt,
|
135 | this._hyphenExcerpt,
|
136 | this._spacingAfterHyphenExcerpt,
|
137 | this._unsupportedJsdocTypeAfterHyphenExcerpt,
|
138 | this.content
|
139 | ];
|
140 | };
|
141 | return DocParamBlock;
|
142 | }(DocBlock_1.DocBlock));
|
143 | exports.DocParamBlock = DocParamBlock;
|
144 |
|
\ | No newline at end of file |