typedoc 0.25.0 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/lib/application.d.ts +3 -3
- package/dist/lib/application.js +440 -359
- package/dist/lib/cli.js +6 -3
- package/dist/lib/converter/comments/discovery.js +8 -2
- package/dist/lib/converter/comments/index.js +9 -1
- package/dist/lib/converter/comments/parser.js +5 -11
- package/dist/lib/converter/comments/tagName.d.ts +8 -0
- package/dist/lib/converter/comments/tagName.js +62 -0
- package/dist/lib/converter/context.js +1 -2
- package/dist/lib/converter/converter.d.ts +11 -11
- package/dist/lib/converter/converter.js +436 -311
- package/dist/lib/converter/factories/signature.d.ts +1 -0
- package/dist/lib/converter/factories/signature.js +31 -5
- package/dist/lib/converter/jsdoc.js +2 -6
- package/dist/lib/converter/plugins/CategoryPlugin.d.ts +8 -8
- package/dist/lib/converter/plugins/CategoryPlugin.js +293 -200
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +8 -5
- package/dist/lib/converter/plugins/CommentPlugin.js +433 -305
- package/dist/lib/converter/plugins/GroupPlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/GroupPlugin.js +226 -145
- package/dist/lib/converter/plugins/ImplementsPlugin.js +239 -194
- package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +1 -1
- package/dist/lib/converter/plugins/InheritDocPlugin.js +201 -138
- package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +1 -1
- package/dist/lib/converter/plugins/LinkResolverPlugin.js +110 -44
- package/dist/lib/converter/plugins/PackagePlugin.d.ts +6 -4
- package/dist/lib/converter/plugins/PackagePlugin.js +191 -96
- package/dist/lib/converter/plugins/SourcePlugin.d.ts +6 -6
- package/dist/lib/converter/plugins/SourcePlugin.js +234 -146
- package/dist/lib/converter/plugins/TypePlugin.js +147 -102
- package/dist/lib/converter/symbols.js +1 -1
- package/dist/lib/converter/types.js +10 -0
- package/dist/lib/converter/utils/repository.js +2 -2
- package/dist/lib/models/reflections/ReflectionSymbolId.js +1 -1
- package/dist/lib/models/reflections/abstract.d.ts +4 -0
- package/dist/lib/models/reflections/abstract.js +14 -2
- package/dist/lib/models/reflections/index.d.ts +1 -1
- package/dist/lib/output/components.d.ts +1 -0
- package/dist/lib/output/components.js +9 -1
- package/dist/lib/output/index.d.ts +1 -1
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +1 -1
- package/dist/lib/output/plugins/AssetsPlugin.js +111 -44
- package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +2 -1
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +173 -99
- package/dist/lib/output/plugins/NavigationPlugin.d.ts +6 -0
- package/dist/lib/output/plugins/NavigationPlugin.js +109 -0
- package/dist/lib/output/plugins/index.d.ts +2 -1
- package/dist/lib/output/plugins/index.js +5 -3
- package/dist/lib/output/renderer.d.ts +10 -8
- package/dist/lib/output/renderer.js +315 -202
- package/dist/lib/output/theme.js +63 -18
- package/dist/lib/output/themes/MarkedPlugin.d.ts +4 -4
- package/dist/lib/output/themes/MarkedPlugin.js +223 -145
- package/dist/lib/output/themes/default/DefaultTheme.d.ts +14 -1
- package/dist/lib/output/themes/default/DefaultTheme.js +72 -0
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +42 -36
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +15 -1
- package/dist/lib/output/themes/default/layouts/default.js +2 -0
- package/dist/lib/output/themes/default/partials/header.js +1 -1
- package/dist/lib/output/themes/default/partials/icon.d.ts +4 -1
- package/dist/lib/output/themes/default/partials/icon.js +46 -35
- package/dist/lib/output/themes/default/partials/member.signature.body.js +1 -1
- package/dist/lib/output/themes/default/partials/navigation.js +34 -67
- package/dist/lib/utils/component.d.ts +1 -1
- package/dist/lib/utils/component.js +3 -1
- package/dist/lib/utils/entry-point.js +36 -18
- package/dist/lib/utils/events.js +1 -1
- package/dist/lib/utils/general.js +1 -1
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.js +2 -1
- package/dist/lib/utils/jsx.js +1 -1
- package/dist/lib/utils/options/declaration.d.ts +4 -0
- package/dist/lib/utils/options/index.d.ts +1 -1
- package/dist/lib/utils/options/index.js +2 -1
- package/dist/lib/utils/options/options.d.ts +19 -0
- package/dist/lib/utils/options/options.js +22 -2
- package/dist/lib/utils/options/readers/tsconfig.js +2 -7
- package/dist/lib/utils/options/sources/typedoc.js +22 -0
- package/dist/lib/utils/perf.d.ts +1 -1
- package/dist/lib/utils/perf.js +10 -20
- package/package.json +9 -9
- package/static/main.js +4 -3
- package/static/style.css +7 -3
|
@@ -1,9 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
39
|
+
};
|
|
40
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
41
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
42
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
43
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
44
|
+
};
|
|
45
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
46
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
47
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
48
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
49
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
50
|
};
|
|
8
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
52
|
exports.CommentPlugin = void 0;
|
|
@@ -11,6 +54,7 @@ const components_1 = require("../components");
|
|
|
11
54
|
const converter_1 = require("../converter");
|
|
12
55
|
const models_1 = require("../../models");
|
|
13
56
|
const utils_1 = require("../../utils");
|
|
57
|
+
const CategoryPlugin_1 = require("./CategoryPlugin");
|
|
14
58
|
/**
|
|
15
59
|
* These tags are not useful to display in the generated documentation.
|
|
16
60
|
* They should be ignored when parsing comments. Any relevant type information
|
|
@@ -88,340 +132,419 @@ const NEVER_RENDERED = [
|
|
|
88
132
|
* - Resolve `@link` tags to point to target reflections
|
|
89
133
|
*
|
|
90
134
|
*/
|
|
91
|
-
let CommentPlugin =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
135
|
+
let CommentPlugin = (() => {
|
|
136
|
+
var _CommentPlugin_excludeTags_accessor_storage, _CommentPlugin_excludeInternal_accessor_storage, _CommentPlugin_excludePrivate_accessor_storage, _CommentPlugin_excludeProtected_accessor_storage, _CommentPlugin_excludeNotDocumented_accessor_storage, _CommentPlugin_excludeCategories_accessor_storage, _CommentPlugin_defaultCategory_accessor_storage;
|
|
137
|
+
let _classDecorators = [(0, components_1.Component)({ name: "comment" })];
|
|
138
|
+
let _classDescriptor;
|
|
139
|
+
let _classExtraInitializers = [];
|
|
140
|
+
let _classThis;
|
|
141
|
+
let _classSuper = components_1.ConverterComponent;
|
|
142
|
+
let _instanceExtraInitializers = [];
|
|
143
|
+
let _excludeTags_decorators;
|
|
144
|
+
let _excludeTags_initializers = [];
|
|
145
|
+
let _excludeInternal_decorators;
|
|
146
|
+
let _excludeInternal_initializers = [];
|
|
147
|
+
let _excludePrivate_decorators;
|
|
148
|
+
let _excludePrivate_initializers = [];
|
|
149
|
+
let _excludeProtected_decorators;
|
|
150
|
+
let _excludeProtected_initializers = [];
|
|
151
|
+
let _excludeNotDocumented_decorators;
|
|
152
|
+
let _excludeNotDocumented_initializers = [];
|
|
153
|
+
let _excludeCategories_decorators;
|
|
154
|
+
let _excludeCategories_initializers = [];
|
|
155
|
+
let _defaultCategory_decorators;
|
|
156
|
+
let _defaultCategory_initializers = [];
|
|
157
|
+
var CommentPlugin = _classThis = class extends _classSuper {
|
|
158
|
+
constructor() {
|
|
159
|
+
super(...arguments);
|
|
160
|
+
_CommentPlugin_excludeTags_accessor_storage.set(this, (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _excludeTags_initializers, void 0)));
|
|
161
|
+
_CommentPlugin_excludeInternal_accessor_storage.set(this, __runInitializers(this, _excludeInternal_initializers, void 0));
|
|
162
|
+
_CommentPlugin_excludePrivate_accessor_storage.set(this, __runInitializers(this, _excludePrivate_initializers, void 0));
|
|
163
|
+
_CommentPlugin_excludeProtected_accessor_storage.set(this, __runInitializers(this, _excludeProtected_initializers, void 0));
|
|
164
|
+
_CommentPlugin_excludeNotDocumented_accessor_storage.set(this, __runInitializers(this, _excludeNotDocumented_initializers, void 0));
|
|
165
|
+
_CommentPlugin_excludeCategories_accessor_storage.set(this, __runInitializers(this, _excludeCategories_initializers, void 0));
|
|
166
|
+
_CommentPlugin_defaultCategory_accessor_storage.set(this, __runInitializers(this, _defaultCategory_initializers, void 0));
|
|
122
167
|
}
|
|
123
|
-
|
|
124
|
-
|
|
168
|
+
get excludeTags() { return __classPrivateFieldGet(this, _CommentPlugin_excludeTags_accessor_storage, "f"); }
|
|
169
|
+
set excludeTags(value) { __classPrivateFieldSet(this, _CommentPlugin_excludeTags_accessor_storage, value, "f"); }
|
|
170
|
+
get excludeInternal() { return __classPrivateFieldGet(this, _CommentPlugin_excludeInternal_accessor_storage, "f"); }
|
|
171
|
+
set excludeInternal(value) { __classPrivateFieldSet(this, _CommentPlugin_excludeInternal_accessor_storage, value, "f"); }
|
|
172
|
+
get excludePrivate() { return __classPrivateFieldGet(this, _CommentPlugin_excludePrivate_accessor_storage, "f"); }
|
|
173
|
+
set excludePrivate(value) { __classPrivateFieldSet(this, _CommentPlugin_excludePrivate_accessor_storage, value, "f"); }
|
|
174
|
+
get excludeProtected() { return __classPrivateFieldGet(this, _CommentPlugin_excludeProtected_accessor_storage, "f"); }
|
|
175
|
+
set excludeProtected(value) { __classPrivateFieldSet(this, _CommentPlugin_excludeProtected_accessor_storage, value, "f"); }
|
|
176
|
+
get excludeNotDocumented() { return __classPrivateFieldGet(this, _CommentPlugin_excludeNotDocumented_accessor_storage, "f"); }
|
|
177
|
+
set excludeNotDocumented(value) { __classPrivateFieldSet(this, _CommentPlugin_excludeNotDocumented_accessor_storage, value, "f"); }
|
|
178
|
+
get excludeCategories() { return __classPrivateFieldGet(this, _CommentPlugin_excludeCategories_accessor_storage, "f"); }
|
|
179
|
+
set excludeCategories(value) { __classPrivateFieldSet(this, _CommentPlugin_excludeCategories_accessor_storage, value, "f"); }
|
|
180
|
+
get defaultCategory() { return __classPrivateFieldGet(this, _CommentPlugin_defaultCategory_accessor_storage, "f"); }
|
|
181
|
+
set defaultCategory(value) { __classPrivateFieldSet(this, _CommentPlugin_defaultCategory_accessor_storage, value, "f"); }
|
|
182
|
+
get excludeNotDocumentedKinds() {
|
|
183
|
+
this._excludeKinds ??= this.application.options
|
|
184
|
+
.getValue("excludeNotDocumentedKinds")
|
|
185
|
+
.reduce((a, b) => a | models_1.ReflectionKind[b], 0);
|
|
186
|
+
return this._excludeKinds;
|
|
125
187
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
188
|
+
/**
|
|
189
|
+
* Create a new CommentPlugin instance.
|
|
190
|
+
*/
|
|
191
|
+
initialize() {
|
|
192
|
+
this.listenTo(this.owner, {
|
|
193
|
+
[converter_1.Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,
|
|
194
|
+
[converter_1.Converter.EVENT_CREATE_SIGNATURE]: this.onDeclaration,
|
|
195
|
+
[converter_1.Converter.EVENT_CREATE_TYPE_PARAMETER]: this.onCreateTypeParameter,
|
|
196
|
+
[converter_1.Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,
|
|
197
|
+
[converter_1.Converter.EVENT_RESOLVE]: this.onResolve,
|
|
198
|
+
[converter_1.Converter.EVENT_END]: () => {
|
|
199
|
+
this._excludeKinds = undefined;
|
|
200
|
+
},
|
|
201
|
+
});
|
|
132
202
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Apply all comment tag modifiers to the given reflection.
|
|
205
|
+
*
|
|
206
|
+
* @param reflection The reflection the modifiers should be applied to.
|
|
207
|
+
* @param comment The comment that should be searched for modifiers.
|
|
208
|
+
*/
|
|
209
|
+
applyModifiers(reflection, comment) {
|
|
210
|
+
if (reflection.kindOf(models_1.ReflectionKind.SomeModule)) {
|
|
211
|
+
comment.removeModifier("@namespace");
|
|
137
212
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (comment.hasModifier("@public")) {
|
|
141
|
-
reflection.setFlag(models_1.ReflectionFlag.Public);
|
|
142
|
-
if (reflection.kindOf(models_1.ReflectionKind.CallSignature)) {
|
|
143
|
-
reflection.parent?.setFlag(models_1.ReflectionFlag.Public);
|
|
213
|
+
if (reflection.kindOf(models_1.ReflectionKind.Interface)) {
|
|
214
|
+
comment.removeModifier("@interface");
|
|
144
215
|
}
|
|
145
|
-
comment.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
comment.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
comment.removeModifier("@eventProperty");
|
|
159
|
-
}
|
|
160
|
-
if (reflection.kindOf(models_1.ReflectionKind.Module | models_1.ReflectionKind.Namespace) ||
|
|
161
|
-
reflection.kind === models_1.ReflectionKind.Project) {
|
|
162
|
-
comment.removeTags("@module");
|
|
163
|
-
comment.removeModifier("@packageDocumentation");
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Triggered when the converter has created a type parameter reflection.
|
|
168
|
-
*
|
|
169
|
-
* @param context The context object describing the current state the converter is in.
|
|
170
|
-
* @param reflection The reflection that is currently processed.
|
|
171
|
-
*/
|
|
172
|
-
onCreateTypeParameter(_context, reflection) {
|
|
173
|
-
const comment = reflection.parent?.comment;
|
|
174
|
-
if (comment) {
|
|
175
|
-
let tag = comment.getIdentifiedTag(reflection.name, "@typeParam");
|
|
176
|
-
if (!tag) {
|
|
177
|
-
tag = comment.getIdentifiedTag(reflection.name, "@template");
|
|
216
|
+
if (comment.hasModifier("@private")) {
|
|
217
|
+
reflection.setFlag(models_1.ReflectionFlag.Private);
|
|
218
|
+
if (reflection.kindOf(models_1.ReflectionKind.CallSignature)) {
|
|
219
|
+
reflection.parent?.setFlag(models_1.ReflectionFlag.Private);
|
|
220
|
+
}
|
|
221
|
+
comment.removeModifier("@private");
|
|
222
|
+
}
|
|
223
|
+
if (comment.hasModifier("@protected")) {
|
|
224
|
+
reflection.setFlag(models_1.ReflectionFlag.Protected);
|
|
225
|
+
if (reflection.kindOf(models_1.ReflectionKind.CallSignature)) {
|
|
226
|
+
reflection.parent?.setFlag(models_1.ReflectionFlag.Protected);
|
|
227
|
+
}
|
|
228
|
+
comment.removeModifier("@protected");
|
|
178
229
|
}
|
|
179
|
-
if (
|
|
180
|
-
|
|
230
|
+
if (comment.hasModifier("@public")) {
|
|
231
|
+
reflection.setFlag(models_1.ReflectionFlag.Public);
|
|
232
|
+
if (reflection.kindOf(models_1.ReflectionKind.CallSignature)) {
|
|
233
|
+
reflection.parent?.setFlag(models_1.ReflectionFlag.Public);
|
|
234
|
+
}
|
|
235
|
+
comment.removeModifier("@public");
|
|
181
236
|
}
|
|
182
|
-
if (
|
|
183
|
-
|
|
237
|
+
if (comment.hasModifier("@readonly")) {
|
|
238
|
+
const target = reflection.kindOf(models_1.ReflectionKind.GetSignature)
|
|
239
|
+
? reflection.parent
|
|
240
|
+
: reflection;
|
|
241
|
+
target.setFlag(models_1.ReflectionFlag.Readonly);
|
|
242
|
+
comment.removeModifier("@readonly");
|
|
184
243
|
}
|
|
185
|
-
if (
|
|
186
|
-
|
|
187
|
-
(
|
|
244
|
+
if (comment.hasModifier("@event") ||
|
|
245
|
+
comment.hasModifier("@eventProperty")) {
|
|
246
|
+
comment.blockTags.push(new models_1.CommentTag("@group", [{ kind: "text", text: "Events" }]));
|
|
247
|
+
comment.removeModifier("@event");
|
|
248
|
+
comment.removeModifier("@eventProperty");
|
|
188
249
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
*
|
|
194
|
-
* Invokes the comment parser.
|
|
195
|
-
*
|
|
196
|
-
* @param context The context object describing the current state the converter is in.
|
|
197
|
-
* @param reflection The reflection that is currently processed.
|
|
198
|
-
* @param node The node that is currently processed if available.
|
|
199
|
-
*/
|
|
200
|
-
onDeclaration(_context, reflection) {
|
|
201
|
-
const comment = reflection.comment;
|
|
202
|
-
if (!comment)
|
|
203
|
-
return;
|
|
204
|
-
if (reflection.kindOf(models_1.ReflectionKind.Module)) {
|
|
205
|
-
const tag = comment.getTag("@module");
|
|
206
|
-
if (tag) {
|
|
207
|
-
// If no name is specified, this is a flag to mark a comment as a module comment
|
|
208
|
-
// and should not result in a reflection rename.
|
|
209
|
-
const newName = models_1.Comment.combineDisplayParts(tag.content).trim();
|
|
210
|
-
if (newName.length && !newName.includes("\n")) {
|
|
211
|
-
reflection.name = newName;
|
|
212
|
-
}
|
|
213
|
-
(0, utils_1.removeIfPresent)(comment.blockTags, tag);
|
|
250
|
+
if (reflection.kindOf(models_1.ReflectionKind.Module | models_1.ReflectionKind.Namespace) ||
|
|
251
|
+
reflection.kind === models_1.ReflectionKind.Project) {
|
|
252
|
+
comment.removeTags("@module");
|
|
253
|
+
comment.removeModifier("@packageDocumentation");
|
|
214
254
|
}
|
|
215
255
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
if (
|
|
233
|
-
|
|
256
|
+
/**
|
|
257
|
+
* Triggered when the converter has created a type parameter reflection.
|
|
258
|
+
*
|
|
259
|
+
* @param context The context object describing the current state the converter is in.
|
|
260
|
+
* @param reflection The reflection that is currently processed.
|
|
261
|
+
*/
|
|
262
|
+
onCreateTypeParameter(_context, reflection) {
|
|
263
|
+
const comment = reflection.parent?.comment;
|
|
264
|
+
if (comment) {
|
|
265
|
+
let tag = comment.getIdentifiedTag(reflection.name, "@typeParam");
|
|
266
|
+
if (!tag) {
|
|
267
|
+
tag = comment.getIdentifiedTag(reflection.name, "@template");
|
|
268
|
+
}
|
|
269
|
+
if (!tag) {
|
|
270
|
+
tag = comment.getIdentifiedTag(`<${reflection.name}>`, "@param");
|
|
271
|
+
}
|
|
272
|
+
if (!tag) {
|
|
273
|
+
tag = comment.getIdentifiedTag(reflection.name, "@param");
|
|
274
|
+
}
|
|
275
|
+
if (tag) {
|
|
276
|
+
reflection.comment = new models_1.Comment(tag.content);
|
|
277
|
+
(0, utils_1.removeIfPresent)(comment.blockTags, tag);
|
|
234
278
|
}
|
|
235
|
-
// Clear flag set by @readonly since it shouldn't be rendered.
|
|
236
|
-
ref.setFlag(models_1.ReflectionFlag.Readonly, false);
|
|
237
|
-
}
|
|
238
|
-
if (this.isHidden(ref)) {
|
|
239
|
-
hidden.add(ref);
|
|
240
279
|
}
|
|
241
280
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
* @param reflection The reflection that is currently resolved.
|
|
267
|
-
*/
|
|
268
|
-
onResolve(context, reflection) {
|
|
269
|
-
if (reflection.comment) {
|
|
270
|
-
if (reflection.comment.label &&
|
|
271
|
-
!/[A-Z_][A-Z0-9_]/.test(reflection.comment.label)) {
|
|
272
|
-
context.logger.warn(`The label "${reflection.comment.label}" for ${reflection.getFriendlyFullName()} cannot be referenced with a declaration reference. ` +
|
|
273
|
-
`Labels may only contain A-Z, 0-9, and _, and may not start with a number.`);
|
|
281
|
+
/**
|
|
282
|
+
* Triggered when the converter has created a declaration or signature reflection.
|
|
283
|
+
*
|
|
284
|
+
* Invokes the comment parser.
|
|
285
|
+
*
|
|
286
|
+
* @param context The context object describing the current state the converter is in.
|
|
287
|
+
* @param reflection The reflection that is currently processed.
|
|
288
|
+
* @param node The node that is currently processed if available.
|
|
289
|
+
*/
|
|
290
|
+
onDeclaration(_context, reflection) {
|
|
291
|
+
const comment = reflection.comment;
|
|
292
|
+
if (!comment)
|
|
293
|
+
return;
|
|
294
|
+
if (reflection.kindOf(models_1.ReflectionKind.SomeModule)) {
|
|
295
|
+
const tag = comment.getTag("@module");
|
|
296
|
+
if (tag) {
|
|
297
|
+
// If no name is specified, this is a flag to mark a comment as a module comment
|
|
298
|
+
// and should not result in a reflection rename.
|
|
299
|
+
const newName = models_1.Comment.combineDisplayParts(tag.content).trim();
|
|
300
|
+
if (newName.length && !newName.includes("\n")) {
|
|
301
|
+
reflection.name = newName;
|
|
302
|
+
}
|
|
303
|
+
(0, utils_1.removeIfPresent)(comment.blockTags, tag);
|
|
304
|
+
}
|
|
274
305
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
if (!(reflection instanceof models_1.DeclarationReflection)) {
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
if (reflection.type instanceof models_1.ReflectionType) {
|
|
282
|
-
this.moveCommentToSignatures(reflection, reflection.type.declaration.getNonIndexSignatures());
|
|
283
|
-
}
|
|
284
|
-
else {
|
|
285
|
-
this.moveCommentToSignatures(reflection, reflection.getNonIndexSignatures());
|
|
306
|
+
this.applyModifiers(reflection, comment);
|
|
307
|
+
this.removeExcludedTags(comment);
|
|
286
308
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
const childComment = (signature.comment || (signature.comment = comment?.clone()));
|
|
303
|
-
if (!childComment)
|
|
304
|
-
continue;
|
|
305
|
-
signature.parameters?.forEach((parameter, index) => {
|
|
306
|
-
if (parameter.name === "__namedParameters") {
|
|
307
|
-
const commentParams = childComment.blockTags.filter((tag) => tag.tag === "@param" && !tag.name?.includes("."));
|
|
308
|
-
if (signature.parameters?.length === commentParams.length &&
|
|
309
|
-
commentParams[index].name) {
|
|
310
|
-
parameter.name = commentParams[index].name;
|
|
309
|
+
/**
|
|
310
|
+
* Triggered when the converter begins resolving a project.
|
|
311
|
+
*
|
|
312
|
+
* @param context The context object describing the current state the converter is in.
|
|
313
|
+
*/
|
|
314
|
+
onBeginResolve(context) {
|
|
315
|
+
const project = context.project;
|
|
316
|
+
const reflections = Object.values(project.reflections);
|
|
317
|
+
// Remove hidden reflections
|
|
318
|
+
const hidden = new Set();
|
|
319
|
+
for (const ref of reflections) {
|
|
320
|
+
if (ref.kindOf(models_1.ReflectionKind.Accessor) && ref.flags.isReadonly) {
|
|
321
|
+
const decl = ref;
|
|
322
|
+
if (decl.setSignature) {
|
|
323
|
+
hidden.add(decl.setSignature);
|
|
311
324
|
}
|
|
325
|
+
// Clear flag set by @readonly since it shouldn't be rendered.
|
|
326
|
+
ref.setFlag(models_1.ReflectionFlag.Readonly, false);
|
|
312
327
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
if (tag) {
|
|
316
|
-
parameter.comment = new models_1.Comment(models_1.Comment.cloneDisplayParts(tag.content));
|
|
328
|
+
if (this.isHidden(ref)) {
|
|
329
|
+
hidden.add(ref);
|
|
317
330
|
}
|
|
331
|
+
}
|
|
332
|
+
hidden.forEach((reflection) => project.removeReflection(reflection));
|
|
333
|
+
// remove functions with empty signatures after their signatures have been removed
|
|
334
|
+
const [allRemoved, someRemoved] = (0, utils_1.partition)((0, utils_1.unique)((0, utils_1.filterMap)(hidden, (reflection) => reflection.parent?.kindOf(models_1.ReflectionKind.SignatureContainer)
|
|
335
|
+
? reflection.parent
|
|
336
|
+
: void 0)), (method) => method.getNonIndexSignatures().length === 0);
|
|
337
|
+
allRemoved.forEach((reflection) => {
|
|
338
|
+
project.removeReflection(reflection);
|
|
318
339
|
});
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
340
|
+
someRemoved.forEach((reflection) => {
|
|
341
|
+
reflection.sources = reflection
|
|
342
|
+
.getNonIndexSignatures()
|
|
343
|
+
.flatMap((s) => s.sources ?? []);
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Triggered when the converter resolves a reflection.
|
|
348
|
+
*
|
|
349
|
+
* Cleans up comment tags related to signatures like `@param` or `@returns`
|
|
350
|
+
* and moves their data to the corresponding parameter reflections.
|
|
351
|
+
*
|
|
352
|
+
* This hook also copies over the comment of function implementations to their
|
|
353
|
+
* signatures.
|
|
354
|
+
*
|
|
355
|
+
* @param context The context object describing the current state the converter is in.
|
|
356
|
+
* @param reflection The reflection that is currently resolved.
|
|
357
|
+
*/
|
|
358
|
+
onResolve(context, reflection) {
|
|
359
|
+
if (reflection.comment) {
|
|
360
|
+
if (reflection.comment.label &&
|
|
361
|
+
!/[A-Z_][A-Z0-9_]/.test(reflection.comment.label)) {
|
|
362
|
+
context.logger.warn(`The label "${reflection.comment.label}" for ${reflection.getFriendlyFullName()} cannot be referenced with a declaration reference. ` +
|
|
363
|
+
`Labels may only contain A-Z, 0-9, and _, and may not start with a number.`);
|
|
325
364
|
}
|
|
365
|
+
mergeSeeTags(reflection.comment);
|
|
366
|
+
movePropertyTags(reflection.comment, reflection);
|
|
367
|
+
}
|
|
368
|
+
if (!(reflection instanceof models_1.DeclarationReflection)) {
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (reflection.type instanceof models_1.ReflectionType) {
|
|
372
|
+
this.moveCommentToSignatures(reflection, reflection.type.declaration.getNonIndexSignatures());
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
this.moveCommentToSignatures(reflection, reflection.getNonIndexSignatures());
|
|
326
376
|
}
|
|
327
|
-
childComment?.removeTags("@param");
|
|
328
|
-
childComment?.removeTags("@typeParam");
|
|
329
|
-
childComment?.removeTags("@template");
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
removeExcludedTags(comment) {
|
|
333
|
-
for (const tag of NEVER_RENDERED) {
|
|
334
|
-
comment.removeTags(tag);
|
|
335
|
-
comment.removeModifier(tag);
|
|
336
|
-
}
|
|
337
|
-
for (const tag of this.excludeTags) {
|
|
338
|
-
comment.removeTags(tag);
|
|
339
|
-
comment.removeModifier(tag);
|
|
340
377
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
378
|
+
moveCommentToSignatures(reflection, signatures) {
|
|
379
|
+
if (!signatures.length) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const comment = reflection.kindOf(models_1.ReflectionKind.ClassOrInterface)
|
|
383
|
+
? undefined
|
|
384
|
+
: reflection.comment;
|
|
385
|
+
// Since this reflection has signatures, remove the comment from the parent
|
|
386
|
+
// reflection. This is important so that in type aliases we don't end up with
|
|
387
|
+
// a comment rendered twice.
|
|
388
|
+
if (!reflection.kindOf(models_1.ReflectionKind.ClassOrInterface)) {
|
|
389
|
+
delete reflection.comment;
|
|
390
|
+
}
|
|
391
|
+
for (const signature of signatures) {
|
|
392
|
+
const childComment = (signature.comment ||= comment?.clone());
|
|
393
|
+
if (!childComment)
|
|
394
|
+
continue;
|
|
395
|
+
signature.parameters?.forEach((parameter, index) => {
|
|
396
|
+
if (parameter.name === "__namedParameters") {
|
|
397
|
+
const commentParams = childComment.blockTags.filter((tag) => tag.tag === "@param" && !tag.name?.includes("."));
|
|
398
|
+
if (signature.parameters?.length === commentParams.length &&
|
|
399
|
+
commentParams[index].name) {
|
|
400
|
+
parameter.name = commentParams[index].name;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
moveNestedParamTags(childComment, parameter);
|
|
404
|
+
const tag = childComment.getIdentifiedTag(parameter.name, "@param");
|
|
405
|
+
if (tag) {
|
|
406
|
+
parameter.comment = new models_1.Comment(models_1.Comment.cloneDisplayParts(tag.content));
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
for (const parameter of signature.typeParameters || []) {
|
|
410
|
+
const tag = childComment.getIdentifiedTag(parameter.name, "@typeParam") ||
|
|
411
|
+
childComment.getIdentifiedTag(parameter.name, "@template") ||
|
|
412
|
+
childComment.getIdentifiedTag(`<${parameter.name}>`, "@param");
|
|
413
|
+
if (tag) {
|
|
414
|
+
parameter.comment = new models_1.Comment(models_1.Comment.cloneDisplayParts(tag.content));
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
childComment?.removeTags("@param");
|
|
418
|
+
childComment?.removeTags("@typeParam");
|
|
419
|
+
childComment?.removeTags("@template");
|
|
420
|
+
}
|
|
352
421
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
422
|
+
removeExcludedTags(comment) {
|
|
423
|
+
for (const tag of NEVER_RENDERED) {
|
|
424
|
+
comment.removeTags(tag);
|
|
425
|
+
comment.removeModifier(tag);
|
|
426
|
+
}
|
|
427
|
+
for (const tag of this.excludeTags) {
|
|
428
|
+
comment.removeTags(tag);
|
|
429
|
+
comment.removeModifier(tag);
|
|
430
|
+
}
|
|
356
431
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
432
|
+
/**
|
|
433
|
+
* Determines whether or not a reflection has been hidden
|
|
434
|
+
*
|
|
435
|
+
* @param reflection Reflection to check if hidden
|
|
436
|
+
*/
|
|
437
|
+
isHidden(reflection) {
|
|
438
|
+
const comment = reflection.comment;
|
|
439
|
+
if (reflection.flags.hasFlag(models_1.ReflectionFlag.Private) &&
|
|
440
|
+
this.excludePrivate) {
|
|
441
|
+
return true;
|
|
364
442
|
}
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
443
|
+
if (reflection.flags.hasFlag(models_1.ReflectionFlag.Protected) &&
|
|
444
|
+
this.excludeProtected) {
|
|
445
|
+
return true;
|
|
446
|
+
}
|
|
447
|
+
if (this.excludedByCategory(reflection)) {
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
if (!comment) {
|
|
451
|
+
// We haven't moved comments from the parent for signatures without a direct
|
|
452
|
+
// comment, so don't exclude those due to not being documented.
|
|
453
|
+
if (reflection.kindOf(models_1.ReflectionKind.CallSignature |
|
|
454
|
+
models_1.ReflectionKind.ConstructorSignature) &&
|
|
455
|
+
reflection.parent?.comment) {
|
|
372
456
|
return false;
|
|
373
457
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
if (!reflection.
|
|
377
|
-
|
|
458
|
+
if (this.excludeNotDocumented) {
|
|
459
|
+
// Don't let excludeNotDocumented remove parameters.
|
|
460
|
+
if (!(reflection instanceof models_1.DeclarationReflection) &&
|
|
461
|
+
!(reflection instanceof models_1.SignatureReflection)) {
|
|
462
|
+
return false;
|
|
378
463
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
.
|
|
385
|
-
|
|
464
|
+
if (!reflection.kindOf(this.excludeNotDocumentedKinds)) {
|
|
465
|
+
return false;
|
|
466
|
+
}
|
|
467
|
+
// excludeNotDocumented should hide a module only if it has no visible children
|
|
468
|
+
if (reflection.kindOf(models_1.ReflectionKind.SomeModule)) {
|
|
469
|
+
if (!reflection.children) {
|
|
470
|
+
return true;
|
|
471
|
+
}
|
|
472
|
+
return reflection.children.every((child) => this.isHidden(child));
|
|
473
|
+
}
|
|
474
|
+
// signature containers should only be hidden if all their signatures are hidden
|
|
475
|
+
if (reflection.kindOf(models_1.ReflectionKind.SignatureContainer)) {
|
|
476
|
+
return reflection
|
|
477
|
+
.getAllSignatures()
|
|
478
|
+
.every((child) => this.isHidden(child));
|
|
479
|
+
}
|
|
480
|
+
// excludeNotDocumented should never hide parts of "type" reflections
|
|
481
|
+
return inTypeLiteral(reflection) === false;
|
|
386
482
|
}
|
|
387
|
-
|
|
388
|
-
|
|
483
|
+
return false;
|
|
484
|
+
}
|
|
485
|
+
const isHidden = comment.hasModifier("@hidden") ||
|
|
486
|
+
comment.hasModifier("@ignore") ||
|
|
487
|
+
(comment.hasModifier("@internal") && this.excludeInternal);
|
|
488
|
+
if (isHidden &&
|
|
489
|
+
reflection.kindOf(models_1.ReflectionKind.ContainsCallSignatures)) {
|
|
490
|
+
return reflection
|
|
491
|
+
.getNonIndexSignatures()
|
|
492
|
+
.every((sig) => {
|
|
493
|
+
return !sig.comment || this.isHidden(sig);
|
|
494
|
+
});
|
|
389
495
|
}
|
|
390
|
-
return
|
|
496
|
+
return isHidden;
|
|
391
497
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
498
|
+
excludedByCategory(reflection) {
|
|
499
|
+
const excludeCategories = this.excludeCategories;
|
|
500
|
+
let target;
|
|
501
|
+
if (reflection instanceof models_1.DeclarationReflection) {
|
|
502
|
+
target = reflection;
|
|
503
|
+
}
|
|
504
|
+
else if (reflection instanceof models_1.SignatureReflection) {
|
|
505
|
+
target = reflection.parent;
|
|
506
|
+
}
|
|
507
|
+
if (!target || !excludeCategories.length)
|
|
508
|
+
return false;
|
|
509
|
+
const categories = CategoryPlugin_1.CategoryPlugin.getCategories(target);
|
|
510
|
+
if (categories.size === 0) {
|
|
511
|
+
categories.add(this.defaultCategory);
|
|
512
|
+
}
|
|
513
|
+
return excludeCategories.some((cat) => categories.has(cat));
|
|
402
514
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
515
|
+
};
|
|
516
|
+
_CommentPlugin_excludeTags_accessor_storage = new WeakMap();
|
|
517
|
+
_CommentPlugin_excludeInternal_accessor_storage = new WeakMap();
|
|
518
|
+
_CommentPlugin_excludePrivate_accessor_storage = new WeakMap();
|
|
519
|
+
_CommentPlugin_excludeProtected_accessor_storage = new WeakMap();
|
|
520
|
+
_CommentPlugin_excludeNotDocumented_accessor_storage = new WeakMap();
|
|
521
|
+
_CommentPlugin_excludeCategories_accessor_storage = new WeakMap();
|
|
522
|
+
_CommentPlugin_defaultCategory_accessor_storage = new WeakMap();
|
|
523
|
+
__setFunctionName(_classThis, "CommentPlugin");
|
|
524
|
+
(() => {
|
|
525
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
526
|
+
_excludeTags_decorators = [(0, utils_1.Option)("excludeTags")];
|
|
527
|
+
_excludeInternal_decorators = [(0, utils_1.Option)("excludeInternal")];
|
|
528
|
+
_excludePrivate_decorators = [(0, utils_1.Option)("excludePrivate")];
|
|
529
|
+
_excludeProtected_decorators = [(0, utils_1.Option)("excludeProtected")];
|
|
530
|
+
_excludeNotDocumented_decorators = [(0, utils_1.Option)("excludeNotDocumented")];
|
|
531
|
+
_excludeCategories_decorators = [(0, utils_1.Option)("excludeCategories")];
|
|
532
|
+
_defaultCategory_decorators = [(0, utils_1.Option)("defaultCategory")];
|
|
533
|
+
__esDecorate(_classThis, null, _excludeTags_decorators, { kind: "accessor", name: "excludeTags", static: false, private: false, access: { has: obj => "excludeTags" in obj, get: obj => obj.excludeTags, set: (obj, value) => { obj.excludeTags = value; } }, metadata: _metadata }, _excludeTags_initializers, _instanceExtraInitializers);
|
|
534
|
+
__esDecorate(_classThis, null, _excludeInternal_decorators, { kind: "accessor", name: "excludeInternal", static: false, private: false, access: { has: obj => "excludeInternal" in obj, get: obj => obj.excludeInternal, set: (obj, value) => { obj.excludeInternal = value; } }, metadata: _metadata }, _excludeInternal_initializers, _instanceExtraInitializers);
|
|
535
|
+
__esDecorate(_classThis, null, _excludePrivate_decorators, { kind: "accessor", name: "excludePrivate", static: false, private: false, access: { has: obj => "excludePrivate" in obj, get: obj => obj.excludePrivate, set: (obj, value) => { obj.excludePrivate = value; } }, metadata: _metadata }, _excludePrivate_initializers, _instanceExtraInitializers);
|
|
536
|
+
__esDecorate(_classThis, null, _excludeProtected_decorators, { kind: "accessor", name: "excludeProtected", static: false, private: false, access: { has: obj => "excludeProtected" in obj, get: obj => obj.excludeProtected, set: (obj, value) => { obj.excludeProtected = value; } }, metadata: _metadata }, _excludeProtected_initializers, _instanceExtraInitializers);
|
|
537
|
+
__esDecorate(_classThis, null, _excludeNotDocumented_decorators, { kind: "accessor", name: "excludeNotDocumented", static: false, private: false, access: { has: obj => "excludeNotDocumented" in obj, get: obj => obj.excludeNotDocumented, set: (obj, value) => { obj.excludeNotDocumented = value; } }, metadata: _metadata }, _excludeNotDocumented_initializers, _instanceExtraInitializers);
|
|
538
|
+
__esDecorate(_classThis, null, _excludeCategories_decorators, { kind: "accessor", name: "excludeCategories", static: false, private: false, access: { has: obj => "excludeCategories" in obj, get: obj => obj.excludeCategories, set: (obj, value) => { obj.excludeCategories = value; } }, metadata: _metadata }, _excludeCategories_initializers, _instanceExtraInitializers);
|
|
539
|
+
__esDecorate(_classThis, null, _defaultCategory_decorators, { kind: "accessor", name: "defaultCategory", static: false, private: false, access: { has: obj => "defaultCategory" in obj, get: obj => obj.defaultCategory, set: (obj, value) => { obj.defaultCategory = value; } }, metadata: _metadata }, _defaultCategory_initializers, _instanceExtraInitializers);
|
|
540
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
541
|
+
CommentPlugin = _classThis = _classDescriptor.value;
|
|
542
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
543
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
544
|
+
})();
|
|
545
|
+
return CommentPlugin = _classThis;
|
|
546
|
+
})();
|
|
406
547
|
exports.CommentPlugin = CommentPlugin;
|
|
407
|
-
__decorate([
|
|
408
|
-
(0, utils_1.BindOption)("excludeTags")
|
|
409
|
-
], CommentPlugin.prototype, "excludeTags", void 0);
|
|
410
|
-
__decorate([
|
|
411
|
-
(0, utils_1.BindOption)("excludeInternal")
|
|
412
|
-
], CommentPlugin.prototype, "excludeInternal", void 0);
|
|
413
|
-
__decorate([
|
|
414
|
-
(0, utils_1.BindOption)("excludePrivate")
|
|
415
|
-
], CommentPlugin.prototype, "excludePrivate", void 0);
|
|
416
|
-
__decorate([
|
|
417
|
-
(0, utils_1.BindOption)("excludeProtected")
|
|
418
|
-
], CommentPlugin.prototype, "excludeProtected", void 0);
|
|
419
|
-
__decorate([
|
|
420
|
-
(0, utils_1.BindOption)("excludeNotDocumented")
|
|
421
|
-
], CommentPlugin.prototype, "excludeNotDocumented", void 0);
|
|
422
|
-
exports.CommentPlugin = CommentPlugin = __decorate([
|
|
423
|
-
(0, components_1.Component)({ name: "comment" })
|
|
424
|
-
], CommentPlugin);
|
|
425
548
|
function inTypeLiteral(refl) {
|
|
426
549
|
while (refl) {
|
|
427
550
|
if (refl.kind === models_1.ReflectionKind.TypeLiteral) {
|
|
@@ -466,6 +589,11 @@ function movePropertyTags(comment, container) {
|
|
|
466
589
|
const child = container.getChildByName(prop.name);
|
|
467
590
|
if (child) {
|
|
468
591
|
child.comment = new models_1.Comment(models_1.Comment.cloneDisplayParts(prop.content));
|
|
592
|
+
if (child instanceof models_1.DeclarationReflection && child.signatures) {
|
|
593
|
+
for (const sig of child.signatures) {
|
|
594
|
+
sig.comment = new models_1.Comment(models_1.Comment.cloneDisplayParts(prop.content));
|
|
595
|
+
}
|
|
596
|
+
}
|
|
469
597
|
}
|
|
470
598
|
}
|
|
471
599
|
}
|