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