UNPKG

2.34 kBJavaScriptView Raw
1"use strict";
2var __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})();
15Object.defineProperty(exports, "__esModule", { value: true });
16exports.DocBlock = void 0;
17var DocNode_1 = require("./DocNode");
18var DocSection_1 = require("./DocSection");
19/**
20 * Represents a section that is introduced by a TSDoc block tag.
21 * For example, an `@example` block.
22 */
23var DocBlock = /** @class */ (function (_super) {
24 __extends(DocBlock, _super);
25 /**
26 * Don't call this directly. Instead use {@link TSDocParser}
27 * @internal
28 */
29 function DocBlock(parameters) {
30 var _this = _super.call(this, parameters) || this;
31 _this._blockTag = parameters.blockTag;
32 _this._content = new DocSection_1.DocSection({ configuration: _this.configuration });
33 return _this;
34 }
35 Object.defineProperty(DocBlock.prototype, "kind", {
36 /** @override */
37 get: function () {
38 return DocNode_1.DocNodeKind.Block;
39 },
40 enumerable: false,
41 configurable: true
42 });
43 Object.defineProperty(DocBlock.prototype, "blockTag", {
44 /**
45 * The TSDoc tag that introduces this section.
46 */
47 get: function () {
48 return this._blockTag;
49 },
50 enumerable: false,
51 configurable: true
52 });
53 Object.defineProperty(DocBlock.prototype, "content", {
54 /**
55 * The TSDoc tag that introduces this section.
56 */
57 get: function () {
58 return this._content;
59 },
60 enumerable: false,
61 configurable: true
62 });
63 /** @override */
64 DocBlock.prototype.onGetChildNodes = function () {
65 return [this.blockTag, this._content];
66 };
67 return DocBlock;
68}(DocNode_1.DocNode));
69exports.DocBlock = DocBlock;
70//# sourceMappingURL=DocBlock.js.map
\No newline at end of file