UNPKG

2.38 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.DocInheritDocTag = void 0;
17var DocNode_1 = require("./DocNode");
18var DocInlineTagBase_1 = require("./DocInlineTagBase");
19/**
20 * Represents an `{@inheritDoc}` tag.
21 */
22var DocInheritDocTag = /** @class */ (function (_super) {
23 __extends(DocInheritDocTag, _super);
24 /**
25 * Don't call this directly. Instead use {@link TSDocParser}
26 * @internal
27 */
28 function DocInheritDocTag(parameters) {
29 var _this = _super.call(this, parameters) || this;
30 if (_this.tagNameWithUpperCase !== '@INHERITDOC') {
31 throw new Error('DocInheritDocTag requires the tag name to be "{@inheritDoc}"');
32 }
33 _this._declarationReference = parameters.declarationReference;
34 return _this;
35 }
36 Object.defineProperty(DocInheritDocTag.prototype, "kind", {
37 /** @override */
38 get: function () {
39 return DocNode_1.DocNodeKind.InheritDocTag;
40 },
41 enumerable: false,
42 configurable: true
43 });
44 Object.defineProperty(DocInheritDocTag.prototype, "declarationReference", {
45 /**
46 * The declaration that the documentation will be inherited from.
47 * If omitted, the documentation will be inherited from the parent class.
48 */
49 get: function () {
50 return this._declarationReference;
51 },
52 enumerable: false,
53 configurable: true
54 });
55 /** @override */
56 DocInheritDocTag.prototype.getChildNodesForContent = function () {
57 // abstract
58 return [this._declarationReference];
59 };
60 return DocInheritDocTag;
61}(DocInlineTagBase_1.DocInlineTagBase));
62exports.DocInheritDocTag = DocInheritDocTag;
63//# sourceMappingURL=DocInheritDocTag.js.map
\No newline at end of file