typedoc 0.23.17 → 0.23.18
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/lib/application.js +1 -1
- package/dist/lib/converter/comments/index.js +16 -1
- package/dist/lib/converter/types.js +10 -1
- package/dist/lib/output/themes/default/partials/type.js +12 -0
- package/dist/lib/utils/entry-point.js +1 -1
- package/dist/lib/utils/options/readers/tsconfig.js +5 -0
- package/package.json +1 -1
package/dist/lib/application.js
CHANGED
|
@@ -129,7 +129,7 @@ let Application = Application_1 = class Application extends component_1.Childabl
|
|
|
129
129
|
this.options.freeze();
|
|
130
130
|
this.logger.verbose(`Using TypeScript ${this.getTypeScriptVersion()} from ${this.getTypeScriptPath()}`);
|
|
131
131
|
if (!supportedVersionMajorMinor.some((version) => version == ts.versionMajorMinor)) {
|
|
132
|
-
this.logger.warn(`You are running with an unsupported TypeScript version!
|
|
132
|
+
this.logger.warn(`You are running with an unsupported TypeScript version! If TypeDoc crashes, this is why. TypeDoc supports ${supportedVersionMajorMinor.join(", ")}`);
|
|
133
133
|
}
|
|
134
134
|
const entryPoints = this.getEntryPoints();
|
|
135
135
|
if (!entryPoints) {
|
|
@@ -64,9 +64,24 @@ function getComment(symbol, kind, config, logger, commentStyle) {
|
|
|
64
64
|
?.every((d) => jsDocCommentKinds.includes(d.kind))) {
|
|
65
65
|
return getJsDocComment(symbol.declarations[0], config, logger);
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
const comment = getCommentImpl((0, discovery_1.discoverComment)(symbol, kind, logger, commentStyle), config, logger, symbol.declarations?.some(ts.isSourceFile) || false);
|
|
68
|
+
if (!comment && kind === models_1.ReflectionKind.Property) {
|
|
69
|
+
return getConstructorParamPropertyComment(symbol, config, logger, commentStyle);
|
|
70
|
+
}
|
|
71
|
+
return comment;
|
|
68
72
|
}
|
|
69
73
|
exports.getComment = getComment;
|
|
74
|
+
function getConstructorParamPropertyComment(symbol, config, logger, commentStyle) {
|
|
75
|
+
const decl = symbol.declarations?.find(ts.isParameter);
|
|
76
|
+
if (!decl)
|
|
77
|
+
return;
|
|
78
|
+
const ctor = decl.parent;
|
|
79
|
+
const comment = getSignatureComment(ctor, config, logger, commentStyle);
|
|
80
|
+
const paramTag = comment?.getIdentifiedTag(symbol.name, "@param");
|
|
81
|
+
if (paramTag) {
|
|
82
|
+
return new models_1.Comment(paramTag.content);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
70
85
|
function getSignatureComment(declaration, config, logger, commentStyle) {
|
|
71
86
|
return getCommentImpl((0, discovery_1.discoverSignatureComment)(declaration, commentStyle), config, logger, false);
|
|
72
87
|
}
|
|
@@ -413,7 +413,16 @@ const referenceConverter = {
|
|
|
413
413
|
return models_1.ReferenceType.createBrokenReference(context.checker.typeToString(type), context.project);
|
|
414
414
|
}
|
|
415
415
|
const ref = models_1.ReferenceType.createSymbolReference(context.resolveAliasedSymbol(symbol), context);
|
|
416
|
-
|
|
416
|
+
if (type.flags & ts.TypeFlags.StringMapping) {
|
|
417
|
+
ref.typeArguments = [
|
|
418
|
+
convertType(context, type.type),
|
|
419
|
+
];
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
ref.typeArguments = (type.aliasSymbol
|
|
423
|
+
? type.aliasTypeArguments
|
|
424
|
+
: type.typeArguments)?.map((ref) => convertType(context, ref));
|
|
425
|
+
}
|
|
417
426
|
return ref;
|
|
418
427
|
},
|
|
419
428
|
};
|
|
@@ -231,6 +231,18 @@ const typeRenderers = {
|
|
|
231
231
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ")")));
|
|
232
232
|
continue;
|
|
233
233
|
}
|
|
234
|
+
if (item.signatures) {
|
|
235
|
+
for (const sig of item.signatures) {
|
|
236
|
+
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
237
|
+
item.name,
|
|
238
|
+
item.flags.isOptional && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "?"),
|
|
239
|
+
context.memberSignatureTitle(sig, {
|
|
240
|
+
hideName: true,
|
|
241
|
+
arrowStyle: false,
|
|
242
|
+
})));
|
|
243
|
+
}
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
234
246
|
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
235
247
|
item.name,
|
|
236
248
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, item.flags.isOptional ? "?: " : ": "),
|
|
@@ -103,7 +103,7 @@ function getEntryPointsForPaths(logger, inputFiles, options, programs = getEntry
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
logger.warn(`
|
|
106
|
+
logger.warn(`The entry point ${(0, paths_1.nicePath)(fileOrDir)} does not exist or is not included in the program for your provided tsconfig.`);
|
|
107
107
|
}
|
|
108
108
|
return entryPoints;
|
|
109
109
|
}
|
|
@@ -11,6 +11,7 @@ const paths_1 = require("../../paths");
|
|
|
11
11
|
const module_1 = require("module");
|
|
12
12
|
const tsdoc_defaults_1 = require("../tsdoc-defaults");
|
|
13
13
|
const array_1 = require("../../array");
|
|
14
|
+
const entry_point_1 = require("../../entry-point");
|
|
14
15
|
function isFile(file) {
|
|
15
16
|
return (0, fs_1.existsSync)(file) && (0, fs_1.statSync)(file).isFile();
|
|
16
17
|
}
|
|
@@ -74,6 +75,10 @@ class TSConfigReader {
|
|
|
74
75
|
if (container.isSet("tsconfig")) {
|
|
75
76
|
logger.error(`The tsconfig file ${(0, paths_1.nicePath)(file)} does not exist`);
|
|
76
77
|
}
|
|
78
|
+
else if (container.getValue("entryPointStrategy") !==
|
|
79
|
+
entry_point_1.EntryPointStrategy.Packages) {
|
|
80
|
+
logger.warn("No tsconfig file found, this will prevent TypeDoc from finding your entry points.");
|
|
81
|
+
}
|
|
77
82
|
return;
|
|
78
83
|
}
|
|
79
84
|
fileToRead = (0, fs_2.normalizePath)((0, path_1.resolve)(fileToRead));
|