UNPKG

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