typedoc 0.25.0 → 0.25.1

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.
Files changed (81) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.js +2 -1
  3. package/dist/lib/application.d.ts +3 -3
  4. package/dist/lib/application.js +440 -359
  5. package/dist/lib/cli.js +6 -3
  6. package/dist/lib/converter/comments/parser.js +5 -11
  7. package/dist/lib/converter/comments/tagName.d.ts +8 -0
  8. package/dist/lib/converter/comments/tagName.js +62 -0
  9. package/dist/lib/converter/context.js +1 -2
  10. package/dist/lib/converter/converter.d.ts +11 -11
  11. package/dist/lib/converter/converter.js +436 -311
  12. package/dist/lib/converter/factories/signature.js +3 -4
  13. package/dist/lib/converter/plugins/CategoryPlugin.d.ts +8 -8
  14. package/dist/lib/converter/plugins/CategoryPlugin.js +293 -200
  15. package/dist/lib/converter/plugins/CommentPlugin.d.ts +8 -5
  16. package/dist/lib/converter/plugins/CommentPlugin.js +433 -305
  17. package/dist/lib/converter/plugins/GroupPlugin.d.ts +3 -3
  18. package/dist/lib/converter/plugins/GroupPlugin.js +215 -145
  19. package/dist/lib/converter/plugins/ImplementsPlugin.js +239 -194
  20. package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +1 -1
  21. package/dist/lib/converter/plugins/InheritDocPlugin.js +201 -138
  22. package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +1 -1
  23. package/dist/lib/converter/plugins/LinkResolverPlugin.js +110 -44
  24. package/dist/lib/converter/plugins/PackagePlugin.d.ts +6 -4
  25. package/dist/lib/converter/plugins/PackagePlugin.js +191 -96
  26. package/dist/lib/converter/plugins/SourcePlugin.d.ts +6 -6
  27. package/dist/lib/converter/plugins/SourcePlugin.js +234 -146
  28. package/dist/lib/converter/plugins/TypePlugin.js +147 -102
  29. package/dist/lib/converter/symbols.js +1 -1
  30. package/dist/lib/converter/types.js +10 -0
  31. package/dist/lib/converter/utils/repository.js +2 -2
  32. package/dist/lib/models/reflections/ReflectionSymbolId.js +1 -1
  33. package/dist/lib/models/reflections/abstract.d.ts +4 -0
  34. package/dist/lib/models/reflections/abstract.js +14 -2
  35. package/dist/lib/models/reflections/index.d.ts +1 -1
  36. package/dist/lib/output/components.d.ts +1 -0
  37. package/dist/lib/output/components.js +9 -1
  38. package/dist/lib/output/index.d.ts +1 -1
  39. package/dist/lib/output/plugins/AssetsPlugin.d.ts +1 -1
  40. package/dist/lib/output/plugins/AssetsPlugin.js +111 -44
  41. package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +2 -1
  42. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +173 -99
  43. package/dist/lib/output/plugins/NavigationPlugin.d.ts +6 -0
  44. package/dist/lib/output/plugins/NavigationPlugin.js +109 -0
  45. package/dist/lib/output/plugins/index.d.ts +2 -1
  46. package/dist/lib/output/plugins/index.js +5 -3
  47. package/dist/lib/output/renderer.d.ts +10 -8
  48. package/dist/lib/output/renderer.js +315 -202
  49. package/dist/lib/output/theme.js +63 -18
  50. package/dist/lib/output/themes/MarkedPlugin.d.ts +4 -4
  51. package/dist/lib/output/themes/MarkedPlugin.js +223 -145
  52. package/dist/lib/output/themes/default/DefaultTheme.d.ts +14 -1
  53. package/dist/lib/output/themes/default/DefaultTheme.js +68 -0
  54. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +42 -36
  55. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +15 -1
  56. package/dist/lib/output/themes/default/layouts/default.js +2 -0
  57. package/dist/lib/output/themes/default/partials/header.js +1 -1
  58. package/dist/lib/output/themes/default/partials/icon.d.ts +4 -1
  59. package/dist/lib/output/themes/default/partials/icon.js +40 -35
  60. package/dist/lib/output/themes/default/partials/member.signature.body.js +1 -1
  61. package/dist/lib/output/themes/default/partials/navigation.js +34 -67
  62. package/dist/lib/utils/component.d.ts +1 -1
  63. package/dist/lib/utils/component.js +3 -1
  64. package/dist/lib/utils/entry-point.js +27 -14
  65. package/dist/lib/utils/events.js +1 -1
  66. package/dist/lib/utils/general.js +1 -1
  67. package/dist/lib/utils/index.d.ts +1 -1
  68. package/dist/lib/utils/index.js +2 -1
  69. package/dist/lib/utils/jsx.js +1 -1
  70. package/dist/lib/utils/options/declaration.d.ts +2 -0
  71. package/dist/lib/utils/options/index.d.ts +1 -1
  72. package/dist/lib/utils/options/index.js +2 -1
  73. package/dist/lib/utils/options/options.d.ts +19 -0
  74. package/dist/lib/utils/options/options.js +22 -2
  75. package/dist/lib/utils/options/readers/tsconfig.js +2 -7
  76. package/dist/lib/utils/options/sources/typedoc.js +11 -0
  77. package/dist/lib/utils/perf.d.ts +1 -1
  78. package/dist/lib/utils/perf.js +10 -20
  79. package/package.json +1 -1
  80. package/static/main.js +4 -3
  81. package/static/style.css +7 -3
@@ -1,14 +1,56 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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
  var __importDefault = (this && this.__importDefault) || function (mod) {
9
52
  return (mod && mod.__esModule) ? mod : { "default": mod };
10
53
  };
11
- var Converter_1;
12
54
  Object.defineProperty(exports, "__esModule", { value: true });
13
55
  exports.Converter = void 0;
14
56
  const typescript_1 = __importDefault(require("typescript"));
@@ -28,332 +70,415 @@ const linkResolver_1 = require("./comments/linkResolver");
28
70
  /**
29
71
  * Compiles source files using TypeScript and converts compiler symbols to reflections.
30
72
  */
31
- let Converter = Converter_1 = class Converter extends component_1.ChildableComponent {
32
- get config() {
33
- return this._config || this._buildCommentParserConfig();
34
- }
35
- constructor(owner) {
36
- super(owner);
37
- this._externalSymbolResolvers = [];
38
- this.addUnknownSymbolResolver((ref) => {
39
- // Require global links, matching local ones will likely hide mistakes where the
40
- // user meant to link to a local type.
41
- if (ref.resolutionStart !== "global" || !ref.symbolReference) {
42
- return;
73
+ let Converter = (() => {
74
+ var _Converter_externalPattern_accessor_storage, _Converter_excludeExternals_accessor_storage, _Converter_excludeNotDocumented_accessor_storage, _Converter_excludePrivate_accessor_storage, _Converter_excludeProtected_accessor_storage, _Converter_excludeReferences_accessor_storage, _Converter_commentStyle_accessor_storage, _Converter_validation_accessor_storage, _Converter_externalSymbolLinkMappings_accessor_storage, _Converter_useTsLinkResolution_accessor_storage, _Converter_preserveLinkText_accessor_storage;
75
+ let _classDecorators = [(0, component_1.Component)({
76
+ name: "converter",
77
+ internal: true,
78
+ childClass: components_1.ConverterComponent,
79
+ })];
80
+ let _classDescriptor;
81
+ let _classExtraInitializers = [];
82
+ let _classThis;
83
+ let _classSuper = component_1.ChildableComponent;
84
+ let _instanceExtraInitializers = [];
85
+ let _externalPattern_decorators;
86
+ let _externalPattern_initializers = [];
87
+ let _excludeExternals_decorators;
88
+ let _excludeExternals_initializers = [];
89
+ let _excludeNotDocumented_decorators;
90
+ let _excludeNotDocumented_initializers = [];
91
+ let _excludePrivate_decorators;
92
+ let _excludePrivate_initializers = [];
93
+ let _excludeProtected_decorators;
94
+ let _excludeProtected_initializers = [];
95
+ let _excludeReferences_decorators;
96
+ let _excludeReferences_initializers = [];
97
+ let _commentStyle_decorators;
98
+ let _commentStyle_initializers = [];
99
+ let _validation_decorators;
100
+ let _validation_initializers = [];
101
+ let _externalSymbolLinkMappings_decorators;
102
+ let _externalSymbolLinkMappings_initializers = [];
103
+ let _useTsLinkResolution_decorators;
104
+ let _useTsLinkResolution_initializers = [];
105
+ let _preserveLinkText_decorators;
106
+ let _preserveLinkText_initializers = [];
107
+ var Converter = _classThis = class extends _classSuper {
108
+ /** @internal */
109
+ get externalPattern() { return __classPrivateFieldGet(this, _Converter_externalPattern_accessor_storage, "f"); }
110
+ set externalPattern(value) { __classPrivateFieldSet(this, _Converter_externalPattern_accessor_storage, value, "f"); }
111
+ /** @internal */
112
+ get excludeExternals() { return __classPrivateFieldGet(this, _Converter_excludeExternals_accessor_storage, "f"); }
113
+ set excludeExternals(value) { __classPrivateFieldSet(this, _Converter_excludeExternals_accessor_storage, value, "f"); }
114
+ /** @internal */
115
+ get excludeNotDocumented() { return __classPrivateFieldGet(this, _Converter_excludeNotDocumented_accessor_storage, "f"); }
116
+ set excludeNotDocumented(value) { __classPrivateFieldSet(this, _Converter_excludeNotDocumented_accessor_storage, value, "f"); }
117
+ /** @internal */
118
+ get excludePrivate() { return __classPrivateFieldGet(this, _Converter_excludePrivate_accessor_storage, "f"); }
119
+ set excludePrivate(value) { __classPrivateFieldSet(this, _Converter_excludePrivate_accessor_storage, value, "f"); }
120
+ /** @internal */
121
+ get excludeProtected() { return __classPrivateFieldGet(this, _Converter_excludeProtected_accessor_storage, "f"); }
122
+ set excludeProtected(value) { __classPrivateFieldSet(this, _Converter_excludeProtected_accessor_storage, value, "f"); }
123
+ /** @internal */
124
+ get excludeReferences() { return __classPrivateFieldGet(this, _Converter_excludeReferences_accessor_storage, "f"); }
125
+ set excludeReferences(value) { __classPrivateFieldSet(this, _Converter_excludeReferences_accessor_storage, value, "f"); }
126
+ /** @internal */
127
+ get commentStyle() { return __classPrivateFieldGet(this, _Converter_commentStyle_accessor_storage, "f"); }
128
+ set commentStyle(value) { __classPrivateFieldSet(this, _Converter_commentStyle_accessor_storage, value, "f"); }
129
+ /** @internal */
130
+ get validation() { return __classPrivateFieldGet(this, _Converter_validation_accessor_storage, "f"); }
131
+ set validation(value) { __classPrivateFieldSet(this, _Converter_validation_accessor_storage, value, "f"); }
132
+ /** @internal */
133
+ get externalSymbolLinkMappings() { return __classPrivateFieldGet(this, _Converter_externalSymbolLinkMappings_accessor_storage, "f"); }
134
+ set externalSymbolLinkMappings(value) { __classPrivateFieldSet(this, _Converter_externalSymbolLinkMappings_accessor_storage, value, "f"); }
135
+ /** @internal */
136
+ get useTsLinkResolution() { return __classPrivateFieldGet(this, _Converter_useTsLinkResolution_accessor_storage, "f"); }
137
+ set useTsLinkResolution(value) { __classPrivateFieldSet(this, _Converter_useTsLinkResolution_accessor_storage, value, "f"); }
138
+ /** @internal */
139
+ get preserveLinkText() { return __classPrivateFieldGet(this, _Converter_preserveLinkText_accessor_storage, "f"); }
140
+ set preserveLinkText(value) { __classPrivateFieldSet(this, _Converter_preserveLinkText_accessor_storage, value, "f"); }
141
+ get config() {
142
+ return this._config || this._buildCommentParserConfig();
143
+ }
144
+ constructor(owner) {
145
+ super(owner);
146
+ _Converter_externalPattern_accessor_storage.set(this, (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _externalPattern_initializers, void 0)));
147
+ _Converter_excludeExternals_accessor_storage.set(this, __runInitializers(this, _excludeExternals_initializers, void 0));
148
+ _Converter_excludeNotDocumented_accessor_storage.set(this, __runInitializers(this, _excludeNotDocumented_initializers, void 0));
149
+ _Converter_excludePrivate_accessor_storage.set(this, __runInitializers(this, _excludePrivate_initializers, void 0));
150
+ _Converter_excludeProtected_accessor_storage.set(this, __runInitializers(this, _excludeProtected_initializers, void 0));
151
+ _Converter_excludeReferences_accessor_storage.set(this, __runInitializers(this, _excludeReferences_initializers, void 0));
152
+ _Converter_commentStyle_accessor_storage.set(this, __runInitializers(this, _commentStyle_initializers, void 0));
153
+ _Converter_validation_accessor_storage.set(this, __runInitializers(this, _validation_initializers, void 0));
154
+ _Converter_externalSymbolLinkMappings_accessor_storage.set(this, __runInitializers(this, _externalSymbolLinkMappings_initializers, void 0));
155
+ _Converter_useTsLinkResolution_accessor_storage.set(this, __runInitializers(this, _useTsLinkResolution_initializers, void 0));
156
+ _Converter_preserveLinkText_accessor_storage.set(this, __runInitializers(this, _preserveLinkText_initializers, void 0));
157
+ this._externalSymbolResolvers = [];
158
+ this.addUnknownSymbolResolver((ref) => {
159
+ // Require global links, matching local ones will likely hide mistakes where the
160
+ // user meant to link to a local type.
161
+ if (ref.resolutionStart !== "global" || !ref.symbolReference) {
162
+ return;
163
+ }
164
+ const modLinks = this.externalSymbolLinkMappings[ref.moduleSource ?? "global"];
165
+ if (typeof modLinks !== "object") {
166
+ return;
167
+ }
168
+ let name = "";
169
+ if (ref.symbolReference.path) {
170
+ name += ref.symbolReference.path.map((p) => p.path).join(".");
171
+ }
172
+ if (ref.symbolReference.meaning) {
173
+ name += ":" + ref.symbolReference.meaning;
174
+ }
175
+ if (typeof modLinks[name] === "string") {
176
+ return modLinks[name];
177
+ }
178
+ if (typeof modLinks["*"] === "string") {
179
+ return modLinks["*"];
180
+ }
181
+ });
182
+ }
183
+ /**
184
+ * Compile the given source files and create a project reflection for them.
185
+ */
186
+ convert(entryPoints) {
187
+ const programs = entryPoints.map((e) => e.program);
188
+ this.externalPatternCache = void 0;
189
+ const project = new index_1.ProjectReflection(this.application.options.getValue("name"));
190
+ const context = new context_1.Context(this, programs, project);
191
+ this.trigger(Converter.EVENT_BEGIN, context);
192
+ this.compile(entryPoints, context);
193
+ this.resolve(context);
194
+ this.trigger(Converter.EVENT_END, context);
195
+ this._config = undefined;
196
+ return project;
197
+ }
198
+ /** @internal */
199
+ convertSymbol(context, symbol, exportSymbol) {
200
+ (0, symbols_1.convertSymbol)(context, symbol, exportSymbol);
201
+ }
202
+ /**
203
+ * Convert the given TypeScript type into its TypeDoc type reflection.
204
+ *
205
+ * @param context The context object describing the current state the converter is in.
206
+ * @param referenceTarget The target to be used to attempt to resolve reference types
207
+ * @returns The TypeDoc type reflection representing the given node and type.
208
+ * @internal
209
+ */
210
+ convertType(context, node) {
211
+ return (0, types_1.convertType)(context, node);
212
+ }
213
+ /**
214
+ * Parse the given file into a comment. Intended to be used with markdown files.
215
+ */
216
+ parseRawComment(file) {
217
+ return (0, parser_1.parseComment)((0, rawLexer_1.lexCommentString)(file.text), this.config, file, this.application.logger);
218
+ }
219
+ /**
220
+ * Adds a new resolver that the theme can use to try to figure out how to link to a symbol declared
221
+ * by a third-party library which is not included in the documentation.
222
+ *
223
+ * The resolver function will be passed a declaration reference which it can attempt to resolve. If
224
+ * resolution fails, the function should return undefined.
225
+ *
226
+ * Note: This will be used for both references to types declared in node_modules (in which case the
227
+ * reference passed will have the `moduleSource` set and the `symbolReference` will navigate via `.`)
228
+ * and user defined \{\@link\} tags which cannot be resolved. If the link being resolved is inferred
229
+ * from a type, then no `part` will be passed to the resolver function.
230
+ * @since 0.22.14
231
+ */
232
+ addUnknownSymbolResolver(resolver) {
233
+ this._externalSymbolResolvers.push(resolver);
234
+ }
235
+ /** @internal */
236
+ resolveExternalLink(ref, refl, part, symbolId) {
237
+ for (const resolver of this._externalSymbolResolvers) {
238
+ const resolved = resolver(ref, refl, part, symbolId);
239
+ if (resolved)
240
+ return resolved;
43
241
  }
44
- const modLinks = this.externalSymbolLinkMappings[ref.moduleSource ?? "global"];
45
- if (typeof modLinks !== "object") {
46
- return;
242
+ }
243
+ resolveLinks(comment, owner) {
244
+ if (comment instanceof index_1.Comment) {
245
+ (0, linkResolver_1.resolveLinks)(comment, owner, (ref, part, refl, id) => this.resolveExternalLink(ref, part, refl, id), { preserveLinkText: this.preserveLinkText });
47
246
  }
48
- let name = "";
49
- if (ref.symbolReference.path) {
50
- name += ref.symbolReference.path.map((p) => p.path).join(".");
247
+ else {
248
+ return (0, linkResolver_1.resolvePartLinks)(owner, comment, (ref, part, refl, id) => this.resolveExternalLink(ref, part, refl, id), { preserveLinkText: this.preserveLinkText });
51
249
  }
52
- if (ref.symbolReference.meaning) {
53
- name += ":" + ref.symbolReference.meaning;
250
+ }
251
+ /**
252
+ * Compile the files within the given context and convert the compiler symbols to reflections.
253
+ *
254
+ * @param context The context object describing the current state the converter is in.
255
+ * @returns An array containing all errors generated by the TypeScript compiler.
256
+ */
257
+ compile(entryPoints, context) {
258
+ const entries = entryPoints.map((e) => {
259
+ return {
260
+ entryPoint: e,
261
+ context: undefined,
262
+ };
263
+ });
264
+ entries.forEach((e) => {
265
+ context.setActiveProgram(e.entryPoint.program);
266
+ e.context = this.convertExports(context, e.entryPoint, entries.length === 1);
267
+ });
268
+ for (const { entryPoint, context } of entries) {
269
+ // active program is already set on context
270
+ // if we don't have a context, then this entry point is being ignored
271
+ if (context) {
272
+ this.convertReExports(context, entryPoint.sourceFile);
273
+ }
54
274
  }
55
- if (typeof modLinks[name] === "string") {
56
- return modLinks[name];
275
+ context.setActiveProgram(undefined);
276
+ }
277
+ convertExports(context, entryPoint, singleEntryPoint) {
278
+ const node = entryPoint.sourceFile;
279
+ const entryName = entryPoint.displayName;
280
+ const symbol = getSymbolForModuleLike(context, node);
281
+ let moduleContext;
282
+ if (singleEntryPoint) {
283
+ // Special case for when we're giving a single entry point, we don't need to
284
+ // create modules for each entry. Register the project as this module.
285
+ context.project.registerReflection(context.project, symbol);
286
+ context.project.comment = symbol
287
+ ? context.getComment(symbol, context.project.kind)
288
+ : context.getFileComment(node);
289
+ context.trigger(Converter.EVENT_CREATE_DECLARATION, context.project);
290
+ moduleContext = context;
57
291
  }
58
- if (typeof modLinks["*"] === "string") {
59
- return modLinks["*"];
292
+ else {
293
+ const reflection = context.createDeclarationReflection(index_1.ReflectionKind.Module, symbol, void 0, entryName);
294
+ if (!reflection.comment && !symbol) {
295
+ reflection.comment = context.getFileComment(node);
296
+ }
297
+ if (entryPoint.readmeFile) {
298
+ const readme = (0, utils_1.readFile)(entryPoint.readmeFile);
299
+ const comment = this.parseRawComment(new utils_1.MinimalSourceFile(readme, entryPoint.readmeFile));
300
+ if (comment.blockTags.length || comment.modifierTags.size) {
301
+ const ignored = [
302
+ ...comment.blockTags.map((tag) => tag.tag),
303
+ ...comment.modifierTags,
304
+ ];
305
+ context.logger.warn(`Block and modifier tags will be ignored within the readme:\n\t${ignored.join("\n\t")}`);
306
+ }
307
+ reflection.readme = comment.summary;
308
+ }
309
+ reflection.packageVersion = entryPoint.version;
310
+ context.finalizeDeclarationReflection(reflection);
311
+ moduleContext = context.withScope(reflection);
60
312
  }
61
- });
62
- }
313
+ const allExports = getExports(context, node, symbol);
314
+ for (const exp of allExports.filter((exp) => isDirectExport(context.resolveAliasedSymbol(exp), node))) {
315
+ this.convertSymbol(moduleContext, exp);
316
+ }
317
+ return moduleContext;
318
+ }
319
+ convertReExports(moduleContext, node) {
320
+ for (const exp of getExports(moduleContext, node, moduleContext.project.getSymbolFromReflection(moduleContext.scope)).filter((exp) => !isDirectExport(moduleContext.resolveAliasedSymbol(exp), node))) {
321
+ this.convertSymbol(moduleContext, exp);
322
+ }
323
+ }
324
+ /**
325
+ * Resolve the project within the given context.
326
+ *
327
+ * @param context The context object describing the current state the converter is in.
328
+ * @returns The final project reflection.
329
+ */
330
+ resolve(context) {
331
+ this.trigger(Converter.EVENT_RESOLVE_BEGIN, context);
332
+ const project = context.project;
333
+ for (const id in project.reflections) {
334
+ this.trigger(Converter.EVENT_RESOLVE, context, project.reflections[id]);
335
+ }
336
+ this.trigger(Converter.EVENT_RESOLVE_END, context);
337
+ }
338
+ /**
339
+ * Used to determine if we should immediately bail when creating a reflection.
340
+ * Note: This should not be used for excludeNotDocumented because we don't have enough
341
+ * information at this point since comment discovery hasn't happened.
342
+ * @internal
343
+ */
344
+ shouldIgnore(symbol) {
345
+ if (this.isExcluded(symbol)) {
346
+ return true;
347
+ }
348
+ return this.excludeExternals && this.isExternal(symbol);
349
+ }
350
+ isExcluded(symbol) {
351
+ this.excludeCache ??= (0, paths_1.createMinimatch)(this.application.options.getValue("exclude"));
352
+ const cache = this.excludeCache;
353
+ return (symbol.getDeclarations() ?? []).some((node) => (0, paths_1.matchesAny)(cache, node.getSourceFile().fileName));
354
+ }
355
+ /** @internal */
356
+ isExternal(symbol) {
357
+ this.externalPatternCache ??= (0, paths_1.createMinimatch)(this.externalPattern);
358
+ const cache = this.externalPatternCache;
359
+ return (symbol.getDeclarations() ?? []).some((node) => (0, paths_1.matchesAny)(cache, node.getSourceFile().fileName));
360
+ }
361
+ _buildCommentParserConfig() {
362
+ this._config = {
363
+ blockTags: new Set(this.application.options.getValue("blockTags")),
364
+ inlineTags: new Set(this.application.options.getValue("inlineTags")),
365
+ modifierTags: new Set(this.application.options.getValue("modifierTags")),
366
+ jsDocCompatibility: this.application.options.getValue("jsDocCompatibility"),
367
+ };
368
+ return this._config;
369
+ }
370
+ };
371
+ _Converter_externalPattern_accessor_storage = new WeakMap();
372
+ _Converter_excludeExternals_accessor_storage = new WeakMap();
373
+ _Converter_excludeNotDocumented_accessor_storage = new WeakMap();
374
+ _Converter_excludePrivate_accessor_storage = new WeakMap();
375
+ _Converter_excludeProtected_accessor_storage = new WeakMap();
376
+ _Converter_excludeReferences_accessor_storage = new WeakMap();
377
+ _Converter_commentStyle_accessor_storage = new WeakMap();
378
+ _Converter_validation_accessor_storage = new WeakMap();
379
+ _Converter_externalSymbolLinkMappings_accessor_storage = new WeakMap();
380
+ _Converter_useTsLinkResolution_accessor_storage = new WeakMap();
381
+ _Converter_preserveLinkText_accessor_storage = new WeakMap();
382
+ __setFunctionName(_classThis, "Converter");
383
+ (() => {
384
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
385
+ _externalPattern_decorators = [(0, utils_1.Option)("externalPattern")];
386
+ _excludeExternals_decorators = [(0, utils_1.Option)("excludeExternals")];
387
+ _excludeNotDocumented_decorators = [(0, utils_1.Option)("excludeNotDocumented")];
388
+ _excludePrivate_decorators = [(0, utils_1.Option)("excludePrivate")];
389
+ _excludeProtected_decorators = [(0, utils_1.Option)("excludeProtected")];
390
+ _excludeReferences_decorators = [(0, utils_1.Option)("excludeReferences")];
391
+ _commentStyle_decorators = [(0, utils_1.Option)("commentStyle")];
392
+ _validation_decorators = [(0, utils_1.Option)("validation")];
393
+ _externalSymbolLinkMappings_decorators = [(0, utils_1.Option)("externalSymbolLinkMappings")];
394
+ _useTsLinkResolution_decorators = [(0, utils_1.Option)("useTsLinkResolution")];
395
+ _preserveLinkText_decorators = [(0, utils_1.Option)("preserveLinkText")];
396
+ __esDecorate(_classThis, null, _externalPattern_decorators, { kind: "accessor", name: "externalPattern", static: false, private: false, access: { has: obj => "externalPattern" in obj, get: obj => obj.externalPattern, set: (obj, value) => { obj.externalPattern = value; } }, metadata: _metadata }, _externalPattern_initializers, _instanceExtraInitializers);
397
+ __esDecorate(_classThis, null, _excludeExternals_decorators, { kind: "accessor", name: "excludeExternals", static: false, private: false, access: { has: obj => "excludeExternals" in obj, get: obj => obj.excludeExternals, set: (obj, value) => { obj.excludeExternals = value; } }, metadata: _metadata }, _excludeExternals_initializers, _instanceExtraInitializers);
398
+ __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);
399
+ __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);
400
+ __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);
401
+ __esDecorate(_classThis, null, _excludeReferences_decorators, { kind: "accessor", name: "excludeReferences", static: false, private: false, access: { has: obj => "excludeReferences" in obj, get: obj => obj.excludeReferences, set: (obj, value) => { obj.excludeReferences = value; } }, metadata: _metadata }, _excludeReferences_initializers, _instanceExtraInitializers);
402
+ __esDecorate(_classThis, null, _commentStyle_decorators, { kind: "accessor", name: "commentStyle", static: false, private: false, access: { has: obj => "commentStyle" in obj, get: obj => obj.commentStyle, set: (obj, value) => { obj.commentStyle = value; } }, metadata: _metadata }, _commentStyle_initializers, _instanceExtraInitializers);
403
+ __esDecorate(_classThis, null, _validation_decorators, { kind: "accessor", name: "validation", static: false, private: false, access: { has: obj => "validation" in obj, get: obj => obj.validation, set: (obj, value) => { obj.validation = value; } }, metadata: _metadata }, _validation_initializers, _instanceExtraInitializers);
404
+ __esDecorate(_classThis, null, _externalSymbolLinkMappings_decorators, { kind: "accessor", name: "externalSymbolLinkMappings", static: false, private: false, access: { has: obj => "externalSymbolLinkMappings" in obj, get: obj => obj.externalSymbolLinkMappings, set: (obj, value) => { obj.externalSymbolLinkMappings = value; } }, metadata: _metadata }, _externalSymbolLinkMappings_initializers, _instanceExtraInitializers);
405
+ __esDecorate(_classThis, null, _useTsLinkResolution_decorators, { kind: "accessor", name: "useTsLinkResolution", static: false, private: false, access: { has: obj => "useTsLinkResolution" in obj, get: obj => obj.useTsLinkResolution, set: (obj, value) => { obj.useTsLinkResolution = value; } }, metadata: _metadata }, _useTsLinkResolution_initializers, _instanceExtraInitializers);
406
+ __esDecorate(_classThis, null, _preserveLinkText_decorators, { kind: "accessor", name: "preserveLinkText", static: false, private: false, access: { has: obj => "preserveLinkText" in obj, get: obj => obj.preserveLinkText, set: (obj, value) => { obj.preserveLinkText = value; } }, metadata: _metadata }, _preserveLinkText_initializers, _instanceExtraInitializers);
407
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
408
+ Converter = _classThis = _classDescriptor.value;
409
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
410
+ })();
63
411
  /**
64
- * Compile the given source files and create a project reflection for them.
412
+ * General events
65
413
  */
66
- convert(entryPoints) {
67
- const programs = entryPoints.map((e) => e.program);
68
- this.externalPatternCache = void 0;
69
- const project = new index_1.ProjectReflection(this.application.options.getValue("name"));
70
- const context = new context_1.Context(this, programs, project);
71
- this.trigger(Converter_1.EVENT_BEGIN, context);
72
- this.compile(entryPoints, context);
73
- this.resolve(context);
74
- this.trigger(Converter_1.EVENT_END, context);
75
- this._config = undefined;
76
- return project;
77
- }
78
- /** @internal */
79
- convertSymbol(context, symbol, exportSymbol) {
80
- (0, symbols_1.convertSymbol)(context, symbol, exportSymbol);
81
- }
82
414
  /**
83
- * Convert the given TypeScript type into its TypeDoc type reflection.
84
- *
85
- * @param context The context object describing the current state the converter is in.
86
- * @param referenceTarget The target to be used to attempt to resolve reference types
87
- * @returns The TypeDoc type reflection representing the given node and type.
88
- * @internal
415
+ * Triggered when the converter begins converting a project.
416
+ * The listener will be given a {@link Context} object.
417
+ * @event
89
418
  */
90
- convertType(context, node) {
91
- return (0, types_1.convertType)(context, node);
92
- }
419
+ _classThis.EVENT_BEGIN = converter_events_1.ConverterEvents.BEGIN;
93
420
  /**
94
- * Parse the given file into a comment. Intended to be used with markdown files.
421
+ * Triggered when the converter has finished converting a project.
422
+ * The listener will be given a {@link Context} object.
423
+ * @event
95
424
  */
96
- parseRawComment(file) {
97
- return (0, parser_1.parseComment)((0, rawLexer_1.lexCommentString)(file.text), this.config, file, this.application.logger);
98
- }
425
+ _classThis.EVENT_END = converter_events_1.ConverterEvents.END;
99
426
  /**
100
- * Adds a new resolver that the theme can use to try to figure out how to link to a symbol declared
101
- * by a third-party library which is not included in the documentation.
102
- *
103
- * The resolver function will be passed a declaration reference which it can attempt to resolve. If
104
- * resolution fails, the function should return undefined.
105
- *
106
- * Note: This will be used for both references to types declared in node_modules (in which case the
107
- * reference passed will have the `moduleSource` set and the `symbolReference` will navigate via `.`)
108
- * and user defined \{\@link\} tags which cannot be resolved. If the link being resolved is inferred
109
- * from a type, then no `part` will be passed to the resolver function.
110
- * @since 0.22.14
427
+ * Factory events
111
428
  */
112
- addUnknownSymbolResolver(resolver) {
113
- this._externalSymbolResolvers.push(resolver);
114
- }
115
- /** @internal */
116
- resolveExternalLink(ref, refl, part, symbolId) {
117
- for (const resolver of this._externalSymbolResolvers) {
118
- const resolved = resolver(ref, refl, part, symbolId);
119
- if (resolved)
120
- return resolved;
121
- }
122
- }
123
- resolveLinks(comment, owner) {
124
- if (comment instanceof index_1.Comment) {
125
- (0, linkResolver_1.resolveLinks)(comment, owner, (ref, part, refl, id) => this.resolveExternalLink(ref, part, refl, id), { preserveLinkText: this.preserveLinkText });
126
- }
127
- else {
128
- return (0, linkResolver_1.resolvePartLinks)(owner, comment, (ref, part, refl, id) => this.resolveExternalLink(ref, part, refl, id), { preserveLinkText: this.preserveLinkText });
129
- }
130
- }
131
429
  /**
132
- * Compile the files within the given context and convert the compiler symbols to reflections.
133
- *
134
- * @param context The context object describing the current state the converter is in.
135
- * @returns An array containing all errors generated by the TypeScript compiler.
430
+ * Triggered when the converter has created a declaration reflection.
431
+ * The listener will be given {@link Context} and a {@link Models.DeclarationReflection}.
432
+ * @event
136
433
  */
137
- compile(entryPoints, context) {
138
- const entries = entryPoints.map((e) => {
139
- return {
140
- entryPoint: e,
141
- context: undefined,
142
- };
143
- });
144
- entries.forEach((e) => {
145
- context.setActiveProgram(e.entryPoint.program);
146
- e.context = this.convertExports(context, e.entryPoint, entries.length === 1);
147
- });
148
- for (const { entryPoint, context } of entries) {
149
- // active program is already set on context
150
- // if we don't have a context, then this entry point is being ignored
151
- if (context) {
152
- this.convertReExports(context, entryPoint.sourceFile);
153
- }
154
- }
155
- context.setActiveProgram(undefined);
156
- }
157
- convertExports(context, entryPoint, singleEntryPoint) {
158
- const node = entryPoint.sourceFile;
159
- const entryName = entryPoint.displayName;
160
- const symbol = getSymbolForModuleLike(context, node);
161
- let moduleContext;
162
- if (singleEntryPoint) {
163
- // Special case for when we're giving a single entry point, we don't need to
164
- // create modules for each entry. Register the project as this module.
165
- context.project.registerReflection(context.project, symbol);
166
- context.project.comment = symbol
167
- ? context.getComment(symbol, context.project.kind)
168
- : context.getFileComment(node);
169
- context.trigger(Converter_1.EVENT_CREATE_DECLARATION, context.project);
170
- moduleContext = context;
171
- }
172
- else {
173
- const reflection = context.createDeclarationReflection(index_1.ReflectionKind.Module, symbol, void 0, entryName);
174
- if (!reflection.comment && !symbol) {
175
- reflection.comment = context.getFileComment(node);
176
- }
177
- if (entryPoint.readmeFile) {
178
- const readme = (0, utils_1.readFile)(entryPoint.readmeFile);
179
- const comment = this.parseRawComment(new utils_1.MinimalSourceFile(readme, entryPoint.readmeFile));
180
- if (comment.blockTags.length || comment.modifierTags.size) {
181
- const ignored = [
182
- ...comment.blockTags.map((tag) => tag.tag),
183
- ...comment.modifierTags,
184
- ];
185
- context.logger.warn(`Block and modifier tags will be ignored within the readme:\n\t${ignored.join("\n\t")}`);
186
- }
187
- reflection.readme = comment.summary;
188
- }
189
- reflection.packageVersion = entryPoint.version;
190
- context.finalizeDeclarationReflection(reflection);
191
- moduleContext = context.withScope(reflection);
192
- }
193
- const allExports = getExports(context, node, symbol);
194
- for (const exp of allExports.filter((exp) => isDirectExport(context.resolveAliasedSymbol(exp), node))) {
195
- this.convertSymbol(moduleContext, exp);
196
- }
197
- return moduleContext;
198
- }
199
- convertReExports(moduleContext, node) {
200
- for (const exp of getExports(moduleContext, node, moduleContext.project.getSymbolFromReflection(moduleContext.scope)).filter((exp) => !isDirectExport(moduleContext.resolveAliasedSymbol(exp), node))) {
201
- this.convertSymbol(moduleContext, exp);
202
- }
203
- }
434
+ _classThis.EVENT_CREATE_DECLARATION = converter_events_1.ConverterEvents.CREATE_DECLARATION;
204
435
  /**
205
- * Resolve the project within the given context.
206
- *
207
- * @param context The context object describing the current state the converter is in.
208
- * @returns The final project reflection.
436
+ * Triggered when the converter has created a signature reflection.
437
+ * The listener will be given {@link Context}, {@link Models.SignatureReflection} | {@link Models.ProjectReflection} the declaration,
438
+ * `ts.SignatureDeclaration | ts.IndexSignatureDeclaration | ts.JSDocSignature | undefined`,
439
+ * and `ts.Signature | undefined`. The signature will be undefined if the created signature is an index signature.
440
+ * @event
209
441
  */
210
- resolve(context) {
211
- this.trigger(Converter_1.EVENT_RESOLVE_BEGIN, context);
212
- const project = context.project;
213
- for (const id in project.reflections) {
214
- this.trigger(Converter_1.EVENT_RESOLVE, context, project.reflections[id]);
215
- }
216
- this.trigger(Converter_1.EVENT_RESOLVE_END, context);
217
- }
442
+ _classThis.EVENT_CREATE_SIGNATURE = converter_events_1.ConverterEvents.CREATE_SIGNATURE;
218
443
  /**
219
- * Used to determine if we should immediately bail when creating a reflection.
220
- * Note: This should not be used for excludeNotDocumented because we don't have enough
221
- * information at this point since comment discovery hasn't happened.
222
- * @internal
444
+ * Triggered when the converter has created a parameter reflection.
445
+ * The listener will be given {@link Context}, {@link Models.ParameterReflection} and a `ts.Node?`
446
+ * @event
223
447
  */
224
- shouldIgnore(symbol) {
225
- if (this.isExcluded(symbol)) {
226
- return true;
227
- }
228
- return this.excludeExternals && this.isExternal(symbol);
229
- }
230
- isExcluded(symbol) {
231
- this.excludeCache ?? (this.excludeCache = (0, paths_1.createMinimatch)(this.application.options.getValue("exclude")));
232
- const cache = this.excludeCache;
233
- return (symbol.getDeclarations() ?? []).some((node) => (0, paths_1.matchesAny)(cache, node.getSourceFile().fileName));
234
- }
235
- /** @internal */
236
- isExternal(symbol) {
237
- this.externalPatternCache ?? (this.externalPatternCache = (0, paths_1.createMinimatch)(this.externalPattern));
238
- const cache = this.externalPatternCache;
239
- return (symbol.getDeclarations() ?? []).some((node) => (0, paths_1.matchesAny)(cache, node.getSourceFile().fileName));
240
- }
241
- _buildCommentParserConfig() {
242
- this._config = {
243
- blockTags: new Set(this.application.options.getValue("blockTags")),
244
- inlineTags: new Set(this.application.options.getValue("inlineTags")),
245
- modifierTags: new Set(this.application.options.getValue("modifierTags")),
246
- jsDocCompatibility: this.application.options.getValue("jsDocCompatibility"),
247
- };
248
- return this._config;
249
- }
250
- };
448
+ _classThis.EVENT_CREATE_PARAMETER = converter_events_1.ConverterEvents.CREATE_PARAMETER;
449
+ /**
450
+ * Triggered when the converter has created a type parameter reflection.
451
+ * The listener will be given {@link Context} and a {@link Models.TypeParameterReflection}
452
+ * @event
453
+ */
454
+ _classThis.EVENT_CREATE_TYPE_PARAMETER = converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER;
455
+ /**
456
+ * Resolve events
457
+ */
458
+ /**
459
+ * Triggered when the converter begins resolving a project.
460
+ * The listener will be given {@link Context}.
461
+ * @event
462
+ */
463
+ _classThis.EVENT_RESOLVE_BEGIN = converter_events_1.ConverterEvents.RESOLVE_BEGIN;
464
+ /**
465
+ * Triggered when the converter resolves a reflection.
466
+ * The listener will be given {@link Context} and a {@link Reflection}.
467
+ * @event
468
+ */
469
+ _classThis.EVENT_RESOLVE = converter_events_1.ConverterEvents.RESOLVE;
470
+ /**
471
+ * Triggered when the converter has finished resolving a project.
472
+ * The listener will be given {@link Context}.
473
+ * @event
474
+ */
475
+ _classThis.EVENT_RESOLVE_END = converter_events_1.ConverterEvents.RESOLVE_END;
476
+ (() => {
477
+ __runInitializers(_classThis, _classExtraInitializers);
478
+ })();
479
+ return Converter = _classThis;
480
+ })();
251
481
  exports.Converter = Converter;
252
- /**
253
- * General events
254
- */
255
- /**
256
- * Triggered when the converter begins converting a project.
257
- * The listener will be given a {@link Context} object.
258
- * @event
259
- */
260
- Converter.EVENT_BEGIN = converter_events_1.ConverterEvents.BEGIN;
261
- /**
262
- * Triggered when the converter has finished converting a project.
263
- * The listener will be given a {@link Context} object.
264
- * @event
265
- */
266
- Converter.EVENT_END = converter_events_1.ConverterEvents.END;
267
- /**
268
- * Factory events
269
- */
270
- /**
271
- * Triggered when the converter has created a declaration reflection.
272
- * The listener will be given {@link Context} and a {@link Models.DeclarationReflection}.
273
- * @event
274
- */
275
- Converter.EVENT_CREATE_DECLARATION = converter_events_1.ConverterEvents.CREATE_DECLARATION;
276
- /**
277
- * Triggered when the converter has created a signature reflection.
278
- * The listener will be given {@link Context}, {@link Models.SignatureReflection} | {@link Models.ProjectReflection} the declaration,
279
- * `ts.SignatureDeclaration | ts.IndexSignatureDeclaration | ts.JSDocSignature | undefined`,
280
- * and `ts.Signature | undefined`. The signature will be undefined if the created signature is an index signature.
281
- * @event
282
- */
283
- Converter.EVENT_CREATE_SIGNATURE = converter_events_1.ConverterEvents.CREATE_SIGNATURE;
284
- /**
285
- * Triggered when the converter has created a parameter reflection.
286
- * The listener will be given {@link Context}, {@link Models.ParameterReflection} and a `ts.Node?`
287
- * @event
288
- */
289
- Converter.EVENT_CREATE_PARAMETER = converter_events_1.ConverterEvents.CREATE_PARAMETER;
290
- /**
291
- * Triggered when the converter has created a type parameter reflection.
292
- * The listener will be given {@link Context} and a {@link Models.TypeParameterReflection}
293
- * @event
294
- */
295
- Converter.EVENT_CREATE_TYPE_PARAMETER = converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER;
296
- /**
297
- * Resolve events
298
- */
299
- /**
300
- * Triggered when the converter begins resolving a project.
301
- * The listener will be given {@link Context}.
302
- * @event
303
- */
304
- Converter.EVENT_RESOLVE_BEGIN = converter_events_1.ConverterEvents.RESOLVE_BEGIN;
305
- /**
306
- * Triggered when the converter resolves a reflection.
307
- * The listener will be given {@link Context} and a {@link Reflection}.
308
- * @event
309
- */
310
- Converter.EVENT_RESOLVE = converter_events_1.ConverterEvents.RESOLVE;
311
- /**
312
- * Triggered when the converter has finished resolving a project.
313
- * The listener will be given {@link Context}.
314
- * @event
315
- */
316
- Converter.EVENT_RESOLVE_END = converter_events_1.ConverterEvents.RESOLVE_END;
317
- __decorate([
318
- (0, utils_1.BindOption)("externalPattern")
319
- ], Converter.prototype, "externalPattern", void 0);
320
- __decorate([
321
- (0, utils_1.BindOption)("excludeExternals")
322
- ], Converter.prototype, "excludeExternals", void 0);
323
- __decorate([
324
- (0, utils_1.BindOption)("excludeNotDocumented")
325
- ], Converter.prototype, "excludeNotDocumented", void 0);
326
- __decorate([
327
- (0, utils_1.BindOption)("excludePrivate")
328
- ], Converter.prototype, "excludePrivate", void 0);
329
- __decorate([
330
- (0, utils_1.BindOption)("excludeProtected")
331
- ], Converter.prototype, "excludeProtected", void 0);
332
- __decorate([
333
- (0, utils_1.BindOption)("excludeReferences")
334
- ], Converter.prototype, "excludeReferences", void 0);
335
- __decorate([
336
- (0, utils_1.BindOption)("commentStyle")
337
- ], Converter.prototype, "commentStyle", void 0);
338
- __decorate([
339
- (0, utils_1.BindOption)("validation")
340
- ], Converter.prototype, "validation", void 0);
341
- __decorate([
342
- (0, utils_1.BindOption)("externalSymbolLinkMappings")
343
- ], Converter.prototype, "externalSymbolLinkMappings", void 0);
344
- __decorate([
345
- (0, utils_1.BindOption)("useTsLinkResolution")
346
- ], Converter.prototype, "useTsLinkResolution", void 0);
347
- __decorate([
348
- (0, utils_1.BindOption)("preserveLinkText")
349
- ], Converter.prototype, "preserveLinkText", void 0);
350
- exports.Converter = Converter = Converter_1 = __decorate([
351
- (0, component_1.Component)({
352
- name: "converter",
353
- internal: true,
354
- childClass: components_1.ConverterComponent,
355
- })
356
- ], Converter);
357
482
  function getSymbolForModuleLike(context, node) {
358
483
  const symbol = context.checker.getSymbolAtLocation(node) ?? node.symbol;
359
484
  if (symbol) {