typedoc 0.26.10 → 0.27.0-beta.0
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/bin/package.json +3 -0
- package/bin/typedoc +1 -1
- package/dist/index.d.ts +23 -13
- package/dist/index.js +22 -81
- package/dist/lib/application-events.js +1 -4
- package/dist/lib/application.d.ts +26 -16
- package/dist/lib/application.js +222 -242
- package/dist/lib/cli.js +3 -40
- package/dist/lib/converter/comments/blockLexer.d.ts +1 -1
- package/dist/lib/converter/comments/blockLexer.js +24 -30
- package/dist/lib/converter/comments/declarationReference.js +10 -21
- package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +2 -2
- package/dist/lib/converter/comments/declarationReferenceResolver.js +40 -36
- package/dist/lib/converter/comments/discovery.d.ts +4 -4
- package/dist/lib/converter/comments/discovery.js +172 -148
- package/dist/lib/converter/comments/index.d.ts +4 -4
- package/dist/lib/converter/comments/index.js +39 -50
- package/dist/lib/converter/comments/lexer.d.ts +1 -1
- package/dist/lib/converter/comments/lexer.js +2 -5
- package/dist/lib/converter/comments/lineLexer.d.ts +1 -1
- package/dist/lib/converter/comments/lineLexer.js +12 -15
- package/dist/lib/converter/comments/linkResolver.d.ts +2 -2
- package/dist/lib/converter/comments/linkResolver.js +14 -21
- package/dist/lib/converter/comments/parser.d.ts +6 -6
- package/dist/lib/converter/comments/parser.js +69 -96
- package/dist/lib/converter/comments/rawLexer.d.ts +1 -1
- package/dist/lib/converter/comments/rawLexer.js +13 -16
- package/dist/lib/converter/comments/tagName.js +1 -4
- package/dist/lib/converter/comments/textParser.d.ts +4 -4
- package/dist/lib/converter/comments/textParser.js +28 -30
- package/dist/lib/converter/components.d.ts +2 -3
- package/dist/lib/converter/components.js +2 -7
- package/dist/lib/converter/context.d.ts +9 -9
- package/dist/lib/converter/context.js +54 -44
- package/dist/lib/converter/convert-expression.js +16 -23
- package/dist/lib/converter/converter-events.d.ts +1 -0
- package/dist/lib/converter/converter-events.js +2 -4
- package/dist/lib/converter/converter.d.ts +16 -13
- package/dist/lib/converter/converter.js +210 -238
- package/dist/lib/converter/factories/index-signature.d.ts +1 -1
- package/dist/lib/converter/factories/index-signature.js +11 -17
- package/dist/lib/converter/factories/signature.d.ts +2 -2
- package/dist/lib/converter/factories/signature.js +95 -106
- package/dist/lib/converter/index.d.ts +6 -7
- package/dist/lib/converter/index.js +3 -11
- package/dist/lib/converter/jsdoc.d.ts +1 -1
- package/dist/lib/converter/jsdoc.js +34 -41
- package/dist/lib/converter/plugins/CategoryPlugin.d.ts +6 -21
- package/dist/lib/converter/plugins/CategoryPlugin.js +57 -139
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/CommentPlugin.js +153 -163
- package/dist/lib/converter/plugins/GroupPlugin.d.ts +10 -9
- package/dist/lib/converter/plugins/GroupPlugin.js +87 -124
- package/dist/lib/converter/plugins/ImplementsPlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/ImplementsPlugin.js +255 -321
- package/dist/lib/converter/plugins/IncludePlugin.d.ts +11 -0
- package/dist/lib/converter/plugins/IncludePlugin.js +72 -0
- package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/InheritDocPlugin.js +41 -72
- package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +5 -5
- package/dist/lib/converter/plugins/LinkResolverPlugin.js +37 -58
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.d.ts +12 -0
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +49 -0
- package/dist/lib/converter/plugins/PackagePlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/PackagePlugin.js +62 -111
- package/dist/lib/converter/plugins/SourcePlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/SourcePlugin.js +69 -110
- package/dist/lib/converter/plugins/TypePlugin.d.ts +4 -6
- package/dist/lib/converter/plugins/TypePlugin.js +95 -158
- package/dist/lib/converter/plugins/index.d.ts +10 -9
- package/dist/lib/converter/plugins/index.js +10 -21
- package/dist/lib/converter/symbols.d.ts +1 -1
- package/dist/lib/converter/symbols.js +234 -227
- package/dist/lib/converter/types.d.ts +2 -2
- package/dist/lib/converter/types.js +252 -237
- package/dist/lib/converter/utils/nodes.js +5 -13
- package/dist/lib/converter/utils/reflections.d.ts +1 -1
- package/dist/lib/converter/utils/reflections.js +4 -7
- package/dist/lib/converter/utils/repository.d.ts +1 -1
- package/dist/lib/converter/utils/repository.js +103 -97
- package/dist/lib/converter/utils/symbols.js +3 -9
- package/dist/lib/internationalization/index.d.ts +3 -4
- package/dist/lib/internationalization/index.js +3 -8
- package/dist/lib/internationalization/internationalization.d.ts +5 -4
- package/dist/lib/internationalization/internationalization.js +97 -103
- package/dist/lib/internationalization/locale-utils.cjs +8 -0
- package/dist/lib/internationalization/locale-utils.d.cts +8 -0
- package/dist/lib/internationalization/locales/en.cjs +366 -2
- package/dist/lib/internationalization/locales/en.d.cts +339 -2
- package/dist/lib/internationalization/locales/jp.cjs +8 -11
- package/dist/lib/internationalization/locales/jp.d.cts +310 -1
- package/dist/lib/internationalization/locales/ko.cjs +7 -9
- package/dist/lib/internationalization/locales/ko.d.cts +223 -1
- package/dist/lib/internationalization/locales/zh.cjs +7 -10
- package/dist/lib/internationalization/locales/zh.d.cts +381 -1
- package/dist/lib/internationalization/translatable.d.ts +4 -327
- package/dist/lib/internationalization/translatable.js +2 -360
- package/dist/lib/models/FileRegistry.d.ts +20 -9
- package/dist/lib/models/FileRegistry.js +54 -45
- package/dist/lib/models/ReflectionCategory.d.ts +2 -2
- package/dist/lib/models/ReflectionCategory.js +16 -12
- package/dist/lib/models/ReflectionGroup.d.ts +3 -3
- package/dist/lib/models/ReflectionGroup.js +23 -14
- package/dist/lib/models/comments/comment.d.ts +23 -37
- package/dist/lib/models/comments/comment.js +388 -325
- package/dist/lib/models/comments/index.d.ts +2 -2
- package/dist/lib/models/comments/index.js +1 -6
- package/dist/lib/models/index.d.ts +7 -7
- package/dist/lib/models/index.js +7 -23
- package/dist/lib/models/reflections/ReflectionSymbolId.d.ts +2 -2
- package/dist/lib/models/reflections/ReflectionSymbolId.js +42 -34
- package/dist/lib/models/reflections/abstract.d.ts +17 -20
- package/dist/lib/models/reflections/abstract.js +249 -256
- package/dist/lib/models/reflections/container.d.ts +7 -7
- package/dist/lib/models/reflections/container.js +43 -16
- package/dist/lib/models/reflections/declaration.d.ts +15 -12
- package/dist/lib/models/reflections/declaration.js +150 -29
- package/dist/lib/models/reflections/document.d.ts +3 -3
- package/dist/lib/models/reflections/document.js +26 -13
- package/dist/lib/models/reflections/index.d.ts +15 -15
- package/dist/lib/models/reflections/index.js +12 -31
- package/dist/lib/models/reflections/kind.d.ts +1 -1
- package/dist/lib/models/reflections/kind.js +3 -6
- package/dist/lib/models/reflections/parameter.d.ts +5 -4
- package/dist/lib/models/reflections/parameter.js +11 -13
- package/dist/lib/models/reflections/project.d.ts +14 -9
- package/dist/lib/models/reflections/project.js +104 -56
- package/dist/lib/models/reflections/reference.d.ts +3 -3
- package/dist/lib/models/reflections/reference.js +6 -9
- package/dist/lib/models/reflections/signature.d.ts +8 -8
- package/dist/lib/models/reflections/signature.js +35 -14
- package/dist/lib/models/reflections/type-parameter.d.ts +5 -5
- package/dist/lib/models/reflections/type-parameter.js +9 -10
- package/dist/lib/models/reflections/utils.js +1 -4
- package/dist/lib/models/reflections/variant.d.ts +8 -7
- package/dist/lib/models/reflections/variant.js +1 -2
- package/dist/lib/models/sources/file.d.ts +2 -2
- package/dist/lib/models/sources/file.js +22 -5
- package/dist/lib/models/sources/index.d.ts +1 -1
- package/dist/lib/models/sources/index.js +1 -5
- package/dist/lib/models/types.d.ts +26 -13
- package/dist/lib/models/types.js +236 -151
- package/dist/lib/output/components.d.ts +5 -11
- package/dist/lib/output/components.js +84 -125
- package/dist/lib/output/events.d.ts +3 -3
- package/dist/lib/output/events.js +128 -94
- package/dist/lib/output/formatter.d.ts +84 -0
- package/dist/lib/output/formatter.js +619 -0
- package/dist/lib/output/index.d.ts +9 -8
- package/dist/lib/output/index.js +7 -19
- package/dist/lib/output/models/UrlMapping.d.ts +2 -2
- package/dist/lib/output/models/UrlMapping.js +4 -5
- package/dist/lib/output/output.d.ts +13 -0
- package/dist/lib/output/output.js +72 -0
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +7 -8
- package/dist/lib/output/plugins/AssetsPlugin.js +62 -80
- package/dist/lib/output/plugins/IconsPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/IconsPlugin.js +28 -84
- package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +9 -2
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +90 -96
- package/dist/lib/output/plugins/NavigationPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/NavigationPlugin.js +22 -102
- package/dist/lib/output/plugins/SitemapPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/SitemapPlugin.js +60 -120
- package/dist/lib/output/plugins/index.d.ts +6 -6
- package/dist/lib/output/plugins/index.js +6 -15
- package/dist/lib/output/renderer.d.ts +14 -13
- package/dist/lib/output/renderer.js +129 -185
- package/dist/lib/output/theme.d.ts +9 -5
- package/dist/lib/output/theme.js +14 -62
- package/dist/lib/output/themes/MarkedPlugin.d.ts +8 -9
- package/dist/lib/output/themes/MarkedPlugin.js +152 -117
- package/dist/lib/output/themes/default/DefaultTheme.d.ts +17 -29
- package/dist/lib/output/themes/default/DefaultTheme.js +334 -310
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +63 -48
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +119 -95
- package/dist/lib/output/themes/default/Slugger.d.ts +13 -0
- package/dist/lib/output/themes/default/Slugger.js +46 -0
- package/dist/lib/output/themes/default/layouts/default.d.ts +5 -5
- package/dist/lib/output/themes/default/layouts/default.js +67 -34
- package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/anchor-icon.js +4 -7
- package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/breadcrumb.js +4 -8
- package/dist/lib/output/themes/default/partials/comment.d.ts +6 -4
- package/dist/lib/output/themes/default/partials/comment.js +52 -29
- package/dist/lib/output/themes/default/partials/footer.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/footer.js +11 -14
- package/dist/lib/output/themes/default/partials/header.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/header.js +9 -13
- package/dist/lib/output/themes/default/partials/hierarchy.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/hierarchy.js +9 -12
- package/dist/lib/output/themes/default/partials/icon.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/icon.js +78 -73
- package/dist/lib/output/themes/default/partials/index.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/index.js +19 -22
- package/dist/lib/output/themes/default/partials/member.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.declaration.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.declaration.js +18 -61
- package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.getterSetter.js +10 -26
- package/dist/lib/output/themes/default/partials/member.js +19 -24
- package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.signature.body.js +17 -21
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -7
- package/dist/lib/output/themes/default/partials/member.signature.title.js +8 -35
- package/dist/lib/output/themes/default/partials/member.signatures.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.signatures.js +9 -13
- package/dist/lib/output/themes/default/partials/member.sources.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.sources.js +13 -17
- package/dist/lib/output/themes/default/partials/members.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/members.js +10 -42
- package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/moduleReflection.js +62 -0
- package/dist/lib/output/themes/default/partials/navigation.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/navigation.js +51 -62
- package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/reflectionPreview.js +12 -15
- package/dist/lib/output/themes/default/partials/toolbar.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/toolbar.js +16 -20
- package/dist/lib/output/themes/default/partials/type.d.ts +4 -6
- package/dist/lib/output/themes/default/partials/type.js +8 -388
- package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/typeAndParent.js +11 -15
- package/dist/lib/output/themes/default/partials/typeDetails.d.ts +8 -0
- package/dist/lib/output/themes/default/partials/typeDetails.js +221 -0
- package/dist/lib/output/themes/default/partials/typeParameters.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/typeParameters.js +14 -17
- package/dist/lib/output/themes/default/templates/document.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/document.js +3 -7
- package/dist/lib/output/themes/default/templates/hierarchy.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/hierarchy.js +10 -13
- package/dist/lib/output/themes/default/templates/index.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/index.js +3 -7
- package/dist/lib/output/themes/default/templates/reflection.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/reflection.js +31 -34
- package/dist/lib/output/themes/lib.d.ts +17 -3
- package/dist/lib/output/themes/lib.js +110 -49
- package/dist/lib/serialization/components.d.ts +2 -5
- package/dist/lib/serialization/components.js +1 -2
- package/dist/lib/serialization/deserializer.d.ts +21 -7
- package/dist/lib/serialization/deserializer.js +138 -123
- package/dist/lib/serialization/events.d.ts +2 -2
- package/dist/lib/serialization/events.js +6 -5
- package/dist/lib/serialization/index.d.ts +5 -5
- package/dist/lib/serialization/index.js +4 -33
- package/dist/lib/serialization/schema.d.ts +8 -2
- package/dist/lib/serialization/schema.js +2 -2
- package/dist/lib/serialization/serializer.d.ts +11 -5
- package/dist/lib/serialization/serializer.js +32 -25
- package/dist/lib/utils/array.d.ts +3 -0
- package/dist/lib/utils/array.js +26 -27
- package/dist/lib/utils/component.d.ts +2 -44
- package/dist/lib/utils/component.js +10 -102
- package/dist/lib/utils/entry-point.d.ts +3 -4
- package/dist/lib/utils/entry-point.js +114 -85
- package/dist/lib/utils/enum.js +6 -14
- package/dist/lib/utils/events.js +6 -12
- package/dist/lib/utils/fs.js +50 -91
- package/dist/lib/utils/general.d.ts +2 -1
- package/dist/lib/utils/general.js +50 -40
- package/dist/lib/utils/highlighter.js +30 -57
- package/dist/lib/utils/hooks.js +7 -13
- package/dist/lib/utils/html-entities.d.ts +8926 -0
- package/dist/lib/utils/html-entities.js +2329 -0
- package/dist/lib/utils/html.d.ts +8 -0
- package/dist/lib/utils/html.js +81 -34
- package/dist/lib/utils/index.d.ts +22 -22
- package/dist/lib/utils/index.js +20 -91
- package/dist/lib/utils/jsx.d.ts +12 -5
- package/dist/lib/utils/jsx.elements.js +1 -4
- package/dist/lib/utils/jsx.js +53 -20
- package/dist/lib/utils/loggers.d.ts +3 -3
- package/dist/lib/utils/loggers.js +36 -46
- package/dist/lib/utils/map.d.ts +1 -1
- package/dist/lib/utils/map.js +6 -13
- package/dist/lib/utils/minimalSourceFile.js +5 -7
- package/dist/lib/utils/options/declaration.d.ts +33 -7
- package/dist/lib/utils/options/declaration.js +20 -22
- package/dist/lib/utils/options/defaults.d.ts +3 -2
- package/dist/lib/utils/options/defaults.js +18 -38
- package/dist/lib/utils/options/help.d.ts +2 -2
- package/dist/lib/utils/options/help.js +7 -10
- package/dist/lib/utils/options/index.d.ts +6 -6
- package/dist/lib/utils/options/index.js +4 -18
- package/dist/lib/utils/options/options.d.ts +8 -5
- package/dist/lib/utils/options/options.js +47 -71
- package/dist/lib/utils/options/readers/arguments.d.ts +2 -2
- package/dist/lib/utils/options/readers/arguments.js +15 -17
- package/dist/lib/utils/options/readers/index.d.ts +4 -4
- package/dist/lib/utils/options/readers/index.js +4 -11
- package/dist/lib/utils/options/readers/package-json.d.ts +3 -3
- package/dist/lib/utils/options/readers/package-json.js +15 -21
- package/dist/lib/utils/options/readers/tsconfig.d.ts +2 -2
- package/dist/lib/utils/options/readers/tsconfig.js +54 -63
- package/dist/lib/utils/options/readers/typedoc.d.ts +3 -3
- package/dist/lib/utils/options/readers/typedoc.js +47 -90
- package/dist/lib/utils/options/sources/index.d.ts +1 -1
- package/dist/lib/utils/options/sources/index.js +1 -5
- package/dist/lib/utils/options/sources/typedoc.d.ts +1 -1
- package/dist/lib/utils/options/sources/typedoc.js +220 -196
- package/dist/lib/utils/options/tsdoc-defaults.d.ts +3 -3
- package/dist/lib/utils/options/tsdoc-defaults.js +16 -12
- package/dist/lib/utils/package-manifest.d.ts +1 -1
- package/dist/lib/utils/package-manifest.js +15 -19
- package/dist/lib/utils/paths.js +9 -15
- package/dist/lib/utils/perf.js +6 -11
- package/dist/lib/utils/plugins.d.ts +1 -1
- package/dist/lib/utils/plugins.js +16 -17
- package/dist/lib/utils/reflections.d.ts +1 -1
- package/dist/lib/utils/reflections.js +9 -12
- package/dist/lib/utils/set.js +2 -6
- package/dist/lib/utils/sort.d.ts +3 -3
- package/dist/lib/utils/sort.js +20 -24
- package/dist/lib/utils/tsconfig.d.ts +1 -1
- package/dist/lib/utils/tsconfig.js +13 -21
- package/dist/lib/utils/tsutils.d.ts +1 -1
- package/dist/lib/utils/tsutils.js +3 -30
- package/dist/lib/utils/validation.js +6 -12
- package/dist/lib/validation/documentation.d.ts +2 -2
- package/dist/lib/validation/documentation.js +26 -29
- package/dist/lib/validation/exports.d.ts +2 -2
- package/dist/lib/validation/exports.js +9 -11
- package/dist/lib/validation/links.d.ts +2 -2
- package/dist/lib/validation/links.js +4 -7
- package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
- package/dist/lib/validation/unusedMergeModuleWith.js +11 -0
- package/package.json +14 -11
- package/static/main.js +4 -4
- package/static/style.css +91 -2
- package/tsdoc.json +30 -0
- package/dist/lib/output/themes/default/partials/member.reference.d.ts +0 -4
- package/dist/lib/output/themes/default/partials/member.reference.js +0 -30
- package/dist/lib/output/themes/default/partials/parameter.d.ts +0 -4
- package/dist/lib/output/themes/default/partials/parameter.js +0 -79
- package/dist/lib/utils/html-entities.json +0 -2326
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.ConsoleLogger = exports.Logger = exports.LogLevel = void 0;
|
|
7
|
-
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
-
const inspector_1 = require("inspector");
|
|
9
|
-
const path_1 = require("path");
|
|
10
|
-
const paths_1 = require("./paths");
|
|
11
|
-
const isDebugging = () => !!(0, inspector_1.url)();
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
import { url } from "inspector";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { nicePath } from "./paths.js";
|
|
5
|
+
const isDebugging = () => !!url();
|
|
12
6
|
/**
|
|
13
7
|
* List of known log levels. Used to specify the urgency of a log message.
|
|
14
8
|
*/
|
|
15
|
-
var LogLevel;
|
|
9
|
+
export var LogLevel;
|
|
16
10
|
(function (LogLevel) {
|
|
17
11
|
LogLevel[LogLevel["Verbose"] = 0] = "Verbose";
|
|
18
12
|
LogLevel[LogLevel["Info"] = 1] = "Info";
|
|
19
13
|
LogLevel[LogLevel["Warn"] = 2] = "Warn";
|
|
20
14
|
LogLevel[LogLevel["Error"] = 3] = "Error";
|
|
21
15
|
LogLevel[LogLevel["None"] = 4] = "None";
|
|
22
|
-
})(LogLevel || (
|
|
16
|
+
})(LogLevel || (LogLevel = {}));
|
|
23
17
|
const Colors = {
|
|
24
18
|
red: "\u001b[91m",
|
|
25
19
|
yellow: "\u001b[93m",
|
|
@@ -52,29 +46,27 @@ const dummyTranslationProxy = new Proxy({}, {
|
|
|
52
46
|
* This logger also serves as the base class of other loggers as it implements
|
|
53
47
|
* all the required utility functions.
|
|
54
48
|
*/
|
|
55
|
-
class Logger {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this.level = LogLevel.Info;
|
|
77
|
-
}
|
|
49
|
+
export class Logger {
|
|
50
|
+
/**
|
|
51
|
+
* Translation utility for internationalization.
|
|
52
|
+
* @privateRemarks
|
|
53
|
+
* This is fully initialized by the application during bootstrapping.
|
|
54
|
+
*/
|
|
55
|
+
i18n = dummyTranslationProxy;
|
|
56
|
+
/**
|
|
57
|
+
* How many error messages have been logged?
|
|
58
|
+
*/
|
|
59
|
+
errorCount = 0;
|
|
60
|
+
/**
|
|
61
|
+
* How many warning messages have been logged?
|
|
62
|
+
*/
|
|
63
|
+
warningCount = 0;
|
|
64
|
+
seenErrors = new Set();
|
|
65
|
+
seenWarnings = new Set();
|
|
66
|
+
/**
|
|
67
|
+
* The minimum logging level to print.
|
|
68
|
+
*/
|
|
69
|
+
level = LogLevel.Info;
|
|
78
70
|
/**
|
|
79
71
|
* Has an error been raised through the log method?
|
|
80
72
|
*/
|
|
@@ -157,19 +149,19 @@ class Logger {
|
|
|
157
149
|
* @param diagnostic The TypeScript message that should be logged.
|
|
158
150
|
*/
|
|
159
151
|
diagnostic(diagnostic) {
|
|
160
|
-
const output =
|
|
161
|
-
getCanonicalFileName:
|
|
152
|
+
const output = ts.formatDiagnosticsWithColorAndContext([diagnostic], {
|
|
153
|
+
getCanonicalFileName: resolve,
|
|
162
154
|
getCurrentDirectory: () => process.cwd(),
|
|
163
|
-
getNewLine: () =>
|
|
155
|
+
getNewLine: () => ts.sys.newLine,
|
|
164
156
|
});
|
|
165
157
|
switch (diagnostic.category) {
|
|
166
|
-
case
|
|
158
|
+
case ts.DiagnosticCategory.Error:
|
|
167
159
|
this.log(output, LogLevel.Error);
|
|
168
160
|
break;
|
|
169
|
-
case
|
|
161
|
+
case ts.DiagnosticCategory.Warning:
|
|
170
162
|
this.log(output, LogLevel.Warn);
|
|
171
163
|
break;
|
|
172
|
-
case
|
|
164
|
+
case ts.DiagnosticCategory.Message:
|
|
173
165
|
this.log(output, LogLevel.Info);
|
|
174
166
|
}
|
|
175
167
|
}
|
|
@@ -177,11 +169,10 @@ class Logger {
|
|
|
177
169
|
return message;
|
|
178
170
|
}
|
|
179
171
|
}
|
|
180
|
-
exports.Logger = Logger;
|
|
181
172
|
/**
|
|
182
173
|
* A logger that outputs all messages to the console.
|
|
183
174
|
*/
|
|
184
|
-
class ConsoleLogger extends Logger {
|
|
175
|
+
export class ConsoleLogger extends Logger {
|
|
185
176
|
/**
|
|
186
177
|
* Print a log message.
|
|
187
178
|
*
|
|
@@ -210,7 +201,7 @@ class ConsoleLogger extends Logger {
|
|
|
210
201
|
return this.addContext(message, level, args[0].getStart(args[0].getSourceFile(), false), args[0].getSourceFile());
|
|
211
202
|
}
|
|
212
203
|
const [pos, file] = args;
|
|
213
|
-
const path =
|
|
204
|
+
const path = nicePath(file.fileName);
|
|
214
205
|
const { line, character } = file.getLineAndCharacterOfPosition(pos);
|
|
215
206
|
const location = `${color(path, "cyan")}:${color(`${line + 1}`, "yellow")}:${color(`${character}`, "yellow")}`;
|
|
216
207
|
const start = file.text.lastIndexOf("\n", pos) + 1;
|
|
@@ -222,4 +213,3 @@ class ConsoleLogger extends Logger {
|
|
|
222
213
|
return `${prefix} ${message}\n\n${context}\n`;
|
|
223
214
|
}
|
|
224
215
|
}
|
|
225
|
-
exports.ConsoleLogger = ConsoleLogger;
|
package/dist/lib/utils/map.d.ts
CHANGED
package/dist/lib/utils/map.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.StableKeyMap = exports.DefaultMap = void 0;
|
|
5
|
-
class DefaultMap extends Map {
|
|
1
|
+
export class DefaultMap extends Map {
|
|
2
|
+
creator;
|
|
6
3
|
constructor(creator) {
|
|
7
4
|
super();
|
|
8
5
|
this.creator = creator;
|
|
@@ -20,12 +17,9 @@ class DefaultMap extends Map {
|
|
|
20
17
|
return super.get(key);
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this[_a] = "StableKeyMap";
|
|
27
|
-
this.impl = new Map();
|
|
28
|
-
}
|
|
20
|
+
export class StableKeyMap {
|
|
21
|
+
[Symbol.toStringTag] = "StableKeyMap";
|
|
22
|
+
impl = new Map();
|
|
29
23
|
get size() {
|
|
30
24
|
return this.impl.size;
|
|
31
25
|
}
|
|
@@ -63,8 +57,7 @@ class StableKeyMap {
|
|
|
63
57
|
yield v;
|
|
64
58
|
}
|
|
65
59
|
}
|
|
66
|
-
[
|
|
60
|
+
[Symbol.iterator]() {
|
|
67
61
|
return this.entries();
|
|
68
62
|
}
|
|
69
63
|
}
|
|
70
|
-
exports.StableKeyMap = StableKeyMap;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MinimalSourceFile = void 0;
|
|
4
|
-
const array_1 = require("./array");
|
|
1
|
+
import { binaryFindPartition } from "./array.js";
|
|
5
2
|
// I don't like this, but it's necessary so that the lineStarts property isn't
|
|
6
3
|
// visible in the `MinimalSourceFile` type. Even when private it causes compilation
|
|
7
4
|
// errors downstream.
|
|
8
5
|
const lineStarts = new WeakMap();
|
|
9
|
-
class MinimalSourceFile {
|
|
6
|
+
export class MinimalSourceFile {
|
|
7
|
+
fileName;
|
|
8
|
+
text;
|
|
10
9
|
constructor(text, fileName) {
|
|
11
10
|
this.fileName = fileName;
|
|
12
11
|
// This is unfortunate, but the yaml library we use relies on the source
|
|
@@ -34,11 +33,10 @@ class MinimalSourceFile {
|
|
|
34
33
|
starts.push(nextStart + 1);
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
|
-
const line =
|
|
36
|
+
const line = binaryFindPartition(starts, (x) => x > pos) - 1;
|
|
38
37
|
return {
|
|
39
38
|
character: pos - starts[line],
|
|
40
39
|
line,
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
exports.MinimalSourceFile = MinimalSourceFile;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { BundledTheme as ShikiTheme } from "shiki" with { "resolution-mode": "import" };
|
|
2
|
-
import type { LogLevel } from "../loggers";
|
|
3
|
-
import type { SortStrategy } from "../sort";
|
|
4
|
-
import type { EntryPointStrategy } from "../entry-point";
|
|
5
|
-
import type { ReflectionKind } from "../../models/reflections/kind";
|
|
6
|
-
import type { NeverIfInternal } from "
|
|
7
|
-
import type { TranslationProxy } from "../../internationalization/internationalization";
|
|
2
|
+
import type { LogLevel } from "../loggers.js";
|
|
3
|
+
import type { SortStrategy } from "../sort.js";
|
|
4
|
+
import type { EntryPointStrategy } from "../entry-point.js";
|
|
5
|
+
import type { ReflectionKind } from "../../models/reflections/kind.js";
|
|
6
|
+
import type { NeverIfInternal } from "../index.js";
|
|
7
|
+
import type { TranslationProxy } from "../../internationalization/internationalization.js";
|
|
8
8
|
/** @enum */
|
|
9
9
|
export declare const EmitStrategy: {
|
|
10
10
|
readonly both: "both";
|
|
@@ -24,6 +24,11 @@ export declare const CommentStyle: {
|
|
|
24
24
|
readonly All: "all";
|
|
25
25
|
};
|
|
26
26
|
export type CommentStyle = (typeof CommentStyle)[keyof typeof CommentStyle];
|
|
27
|
+
export type OutputSpecification = {
|
|
28
|
+
name: string;
|
|
29
|
+
path: string;
|
|
30
|
+
options?: Partial<TypeDocOptions>;
|
|
31
|
+
};
|
|
27
32
|
/**
|
|
28
33
|
* An interface describing all TypeDoc specific options. Generated from a
|
|
29
34
|
* map which contains more information about each option for better types when
|
|
@@ -90,6 +95,7 @@ export interface TypeDocOptionMap {
|
|
|
90
95
|
gitRevision: string;
|
|
91
96
|
gitRemote: string;
|
|
92
97
|
readme: string;
|
|
98
|
+
outputs: ManuallyValidatedOption<Array<OutputSpecification>>;
|
|
93
99
|
out: string;
|
|
94
100
|
json: string;
|
|
95
101
|
pretty: boolean;
|
|
@@ -98,6 +104,7 @@ export interface TypeDocOptionMap {
|
|
|
98
104
|
lightHighlightTheme: ShikiTheme;
|
|
99
105
|
darkHighlightTheme: ShikiTheme;
|
|
100
106
|
highlightLanguages: string[];
|
|
107
|
+
typePrintWidth: number;
|
|
101
108
|
customCss: string;
|
|
102
109
|
customJs: string;
|
|
103
110
|
markdownItOptions: ManuallyValidatedOption<Record<string, unknown>>;
|
|
@@ -124,6 +131,7 @@ export interface TypeDocOptionMap {
|
|
|
124
131
|
markdownItLoader: ManuallyValidatedOption<(parser: any) => void>;
|
|
125
132
|
basePath: string;
|
|
126
133
|
cname: string;
|
|
134
|
+
favicon: string;
|
|
127
135
|
githubPages: boolean;
|
|
128
136
|
hostedBaseUrl: string;
|
|
129
137
|
useHostedBaseUrlForAbsoluteLinks: boolean;
|
|
@@ -131,7 +139,6 @@ export interface TypeDocOptionMap {
|
|
|
131
139
|
hideGenerator: boolean;
|
|
132
140
|
customFooterHtml: string;
|
|
133
141
|
customFooterHtmlDisableWrapper: boolean;
|
|
134
|
-
hideParameterTypesInTitle: boolean;
|
|
135
142
|
searchInComments: boolean;
|
|
136
143
|
searchInDocuments: boolean;
|
|
137
144
|
cleanOutputDir: boolean;
|
|
@@ -150,6 +157,9 @@ export interface TypeDocOptionMap {
|
|
|
150
157
|
readme: boolean;
|
|
151
158
|
document: boolean;
|
|
152
159
|
};
|
|
160
|
+
sluggerConfiguration: {
|
|
161
|
+
lowercase: boolean;
|
|
162
|
+
};
|
|
153
163
|
visibilityFilters: ManuallyValidatedOption<{
|
|
154
164
|
protected?: boolean;
|
|
155
165
|
private?: boolean;
|
|
@@ -159,6 +169,7 @@ export interface TypeDocOptionMap {
|
|
|
159
169
|
}>;
|
|
160
170
|
searchCategoryBoosts: ManuallyValidatedOption<Record<string, number>>;
|
|
161
171
|
searchGroupBoosts: ManuallyValidatedOption<Record<string, number>>;
|
|
172
|
+
useFirstParagraphOfCommentAsSummary: boolean;
|
|
162
173
|
commentStyle: typeof CommentStyle;
|
|
163
174
|
useTsLinkResolution: boolean;
|
|
164
175
|
preserveLinkText: boolean;
|
|
@@ -168,9 +179,11 @@ export interface TypeDocOptionMap {
|
|
|
168
179
|
inlineTags: `@${string}`[];
|
|
169
180
|
modifierTags: `@${string}`[];
|
|
170
181
|
excludeTags: `@${string}`[];
|
|
182
|
+
notRenderedTags: `@${string}`[];
|
|
171
183
|
externalSymbolLinkMappings: ManuallyValidatedOption<Record<string, Record<string, string>>>;
|
|
172
184
|
cascadedModifierTags: `@${string}`[];
|
|
173
185
|
categorizeByGroup: boolean;
|
|
186
|
+
groupReferencesByType: boolean;
|
|
174
187
|
defaultCategory: string;
|
|
175
188
|
categoryOrder: string[];
|
|
176
189
|
groupOrder: string[];
|
|
@@ -211,6 +224,10 @@ export type ValidationOptions = {
|
|
|
211
224
|
* If set, TypeDoc will produce warnings about declarations that do not have doc comments
|
|
212
225
|
*/
|
|
213
226
|
notDocumented: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* If set, TypeDoc will produce warnings about `@mergeModuleWith` tags which were not resolved.
|
|
229
|
+
*/
|
|
230
|
+
unusedMergeModuleWith: boolean;
|
|
214
231
|
};
|
|
215
232
|
export type JsDocCompatibility = {
|
|
216
233
|
/**
|
|
@@ -316,6 +333,15 @@ export interface StringDeclarationOption extends DeclarationOptionBase {
|
|
|
316
333
|
* An optional hint for the type of input expected, will be displayed in the help output.
|
|
317
334
|
*/
|
|
318
335
|
hint?: ParameterHint;
|
|
336
|
+
/**
|
|
337
|
+
* If specified, when this output is specified TypeDoc will automatically add
|
|
338
|
+
* an output to the `outputs` option whose name is the value of this property with
|
|
339
|
+
* the path set to the value of this option. Should only be used with `type`
|
|
340
|
+
* set to {@link ParameterType.Path}.
|
|
341
|
+
*
|
|
342
|
+
* If any output shortcuts are set, the `outputs` option will be ignored.
|
|
343
|
+
*/
|
|
344
|
+
outputShortcut?: string;
|
|
319
345
|
/**
|
|
320
346
|
* An optional validation function that validates a potential value of this option.
|
|
321
347
|
* The function must throw an Error if the validation fails and should do nothing otherwise.
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ParameterType = exports.ParameterHint = exports.CommentStyle = exports.EmitStrategy = void 0;
|
|
4
|
-
exports.convert = convert;
|
|
5
|
-
exports.getDefaultValue = getDefaultValue;
|
|
6
|
-
const path_1 = require("path");
|
|
1
|
+
import { isAbsolute, join, resolve } from "path";
|
|
7
2
|
/** @enum */
|
|
8
|
-
|
|
3
|
+
export const EmitStrategy = {
|
|
9
4
|
both: "both", // Emit both documentation and JS
|
|
10
5
|
docs: "docs", // Emit documentation, but not JS (default)
|
|
11
6
|
none: "none", // Emit nothing, just convert and run validation
|
|
@@ -14,18 +9,18 @@ exports.EmitStrategy = {
|
|
|
14
9
|
* Determines how TypeDoc searches for comments.
|
|
15
10
|
* @enum
|
|
16
11
|
*/
|
|
17
|
-
|
|
12
|
+
export const CommentStyle = {
|
|
18
13
|
JSDoc: "jsdoc",
|
|
19
14
|
Block: "block",
|
|
20
15
|
Line: "line",
|
|
21
16
|
All: "all",
|
|
22
17
|
};
|
|
23
|
-
var ParameterHint;
|
|
18
|
+
export var ParameterHint;
|
|
24
19
|
(function (ParameterHint) {
|
|
25
20
|
ParameterHint[ParameterHint["File"] = 0] = "File";
|
|
26
21
|
ParameterHint[ParameterHint["Directory"] = 1] = "Directory";
|
|
27
|
-
})(ParameterHint || (
|
|
28
|
-
var ParameterType;
|
|
22
|
+
})(ParameterHint || (ParameterHint = {}));
|
|
23
|
+
export var ParameterType;
|
|
29
24
|
(function (ParameterType) {
|
|
30
25
|
ParameterType[ParameterType["String"] = 0] = "String";
|
|
31
26
|
/**
|
|
@@ -57,15 +52,18 @@ var ParameterType;
|
|
|
57
52
|
* An object with true/false flags
|
|
58
53
|
*/
|
|
59
54
|
ParameterType[ParameterType["Flags"] = 11] = "Flags";
|
|
60
|
-
})(ParameterType || (
|
|
55
|
+
})(ParameterType || (ParameterType = {}));
|
|
61
56
|
const converters = {
|
|
62
57
|
[ParameterType.String](value, option, i18n) {
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
63
59
|
const stringValue = value == null ? "" : String(value);
|
|
64
60
|
option.validate?.(stringValue, i18n);
|
|
65
61
|
return stringValue;
|
|
66
62
|
},
|
|
67
63
|
[ParameterType.Path](value, option, i18n, configPath) {
|
|
68
|
-
const stringValue =
|
|
64
|
+
const stringValue =
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
66
|
+
value == null ? "" : resolve(configPath, String(value));
|
|
69
67
|
option.validate?.(stringValue, i18n);
|
|
70
68
|
return stringValue;
|
|
71
69
|
},
|
|
@@ -99,7 +97,7 @@ const converters = {
|
|
|
99
97
|
else if (typeof value === "string") {
|
|
100
98
|
strArrValue = [value];
|
|
101
99
|
}
|
|
102
|
-
strArrValue = strArrValue.map((path) =>
|
|
100
|
+
strArrValue = strArrValue.map((path) => resolve(configPath, path));
|
|
103
101
|
option.validate?.(strArrValue, i18n);
|
|
104
102
|
return strArrValue;
|
|
105
103
|
},
|
|
@@ -191,7 +189,7 @@ const converters = {
|
|
|
191
189
|
* @param option The option for which the value should be converted.
|
|
192
190
|
* @returns The result of the conversion. Might be the value or an error.
|
|
193
191
|
*/
|
|
194
|
-
function convert(value, option, i18n, configPath, oldValue) {
|
|
192
|
+
export function convert(value, option, i18n, configPath, oldValue) {
|
|
195
193
|
const _converters = converters;
|
|
196
194
|
return _converters[option.type ?? ParameterType.String](value, option, i18n, configPath, oldValue);
|
|
197
195
|
}
|
|
@@ -204,9 +202,9 @@ const defaultGetters = {
|
|
|
204
202
|
if (defaultStr == "") {
|
|
205
203
|
return "";
|
|
206
204
|
}
|
|
207
|
-
return
|
|
205
|
+
return isAbsolute(defaultStr)
|
|
208
206
|
? defaultStr
|
|
209
|
-
:
|
|
207
|
+
: join(process.cwd(), defaultStr);
|
|
210
208
|
},
|
|
211
209
|
[ParameterType.Number](option) {
|
|
212
210
|
return option.defaultValue ?? 0;
|
|
@@ -227,10 +225,10 @@ const defaultGetters = {
|
|
|
227
225
|
return option.defaultValue?.slice() ?? [];
|
|
228
226
|
},
|
|
229
227
|
[ParameterType.PathArray](option) {
|
|
230
|
-
return (option.defaultValue?.map((value) =>
|
|
228
|
+
return (option.defaultValue?.map((value) => resolve(process.cwd(), value)) ?? []);
|
|
231
229
|
},
|
|
232
230
|
[ParameterType.ModuleArray](option) {
|
|
233
|
-
return (option.defaultValue?.map((value) => value.startsWith(".") ?
|
|
231
|
+
return (option.defaultValue?.map((value) => value.startsWith(".") ? resolve(process.cwd(), value) : value) ?? []);
|
|
234
232
|
},
|
|
235
233
|
[ParameterType.GlobArray](option) {
|
|
236
234
|
return resolveGlobPaths(option.defaultValue ?? [], process.cwd());
|
|
@@ -239,7 +237,7 @@ const defaultGetters = {
|
|
|
239
237
|
return { ...option.defaults };
|
|
240
238
|
},
|
|
241
239
|
};
|
|
242
|
-
function getDefaultValue(option) {
|
|
240
|
+
export function getDefaultValue(option) {
|
|
243
241
|
const getters = defaultGetters;
|
|
244
242
|
return getters[option.type ?? ParameterType.String](option);
|
|
245
243
|
}
|
|
@@ -248,7 +246,7 @@ function resolveGlobPaths(globs, configPath) {
|
|
|
248
246
|
const start = path.match(/^[!#]+/)?.[0] ?? "";
|
|
249
247
|
const remaining = path.substring(start.length);
|
|
250
248
|
if (!remaining.startsWith("**")) {
|
|
251
|
-
return start +
|
|
249
|
+
return start + resolve(configPath, remaining);
|
|
252
250
|
}
|
|
253
251
|
return start + remaining;
|
|
254
252
|
});
|
|
@@ -256,7 +254,7 @@ function resolveGlobPaths(globs, configPath) {
|
|
|
256
254
|
function resolveModulePaths(modules, configPath) {
|
|
257
255
|
return modules.map((path) => {
|
|
258
256
|
if (path.startsWith(".")) {
|
|
259
|
-
return
|
|
257
|
+
return resolve(configPath, path);
|
|
260
258
|
}
|
|
261
259
|
return path;
|
|
262
260
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BundledLanguage } from "shiki" with { "resolution-mode": "import" };
|
|
2
|
-
import type { EnumKeys } from "../enum";
|
|
3
|
-
import type { ReflectionKind } from "../../models/index";
|
|
2
|
+
import type { EnumKeys } from "../enum.js";
|
|
3
|
+
import type { ReflectionKind } from "../../models/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Default values for TypeDoc options. This object should not be modified.
|
|
6
6
|
*
|
|
@@ -16,6 +16,7 @@ export declare const OptionDefaults: {
|
|
|
16
16
|
inlineTags: readonly `@${string}`[];
|
|
17
17
|
modifierTags: readonly `@${string}`[];
|
|
18
18
|
cascadedModifierTags: readonly `@${string}`[];
|
|
19
|
+
notRenderedTags: readonly `@${string}`[];
|
|
19
20
|
highlightLanguages: readonly BundledLanguage[];
|
|
20
21
|
sort: readonly string[];
|
|
21
22
|
kindSortOrder: readonly EnumKeys<typeof ReflectionKind>[];
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.OptionDefaults = void 0;
|
|
27
|
-
const TagDefaults = __importStar(require("./tsdoc-defaults"));
|
|
1
|
+
import * as TagDefaults from "./tsdoc-defaults.js";
|
|
28
2
|
/**
|
|
29
3
|
* Default values for TypeDoc options. This object should not be modified.
|
|
30
4
|
*
|
|
@@ -33,7 +7,7 @@ const TagDefaults = __importStar(require("./tsdoc-defaults"));
|
|
|
33
7
|
* they can be exposed as a part of the public API. The unfortunate type declaration
|
|
34
8
|
* is to control the type which appears in the generated documentation.
|
|
35
9
|
*/
|
|
36
|
-
|
|
10
|
+
export const OptionDefaults = {
|
|
37
11
|
excludeNotDocumentedKinds: [
|
|
38
12
|
"Module",
|
|
39
13
|
"Namespace",
|
|
@@ -61,11 +35,24 @@ exports.OptionDefaults = {
|
|
|
61
35
|
"@privateRemarks",
|
|
62
36
|
"@satisfies",
|
|
63
37
|
"@overload",
|
|
38
|
+
"@inline",
|
|
64
39
|
],
|
|
65
40
|
blockTags: TagDefaults.blockTags,
|
|
66
41
|
inlineTags: TagDefaults.inlineTags,
|
|
67
42
|
modifierTags: TagDefaults.modifierTags,
|
|
68
43
|
cascadedModifierTags: ["@alpha", "@beta", "@experimental"],
|
|
44
|
+
notRenderedTags: [
|
|
45
|
+
"@showCategories",
|
|
46
|
+
"@showGroups",
|
|
47
|
+
"@hideCategories",
|
|
48
|
+
"@hideGroups",
|
|
49
|
+
"@expand",
|
|
50
|
+
"@summary",
|
|
51
|
+
"@group",
|
|
52
|
+
"@groupDescription",
|
|
53
|
+
"@category",
|
|
54
|
+
"@categoryDescription",
|
|
55
|
+
],
|
|
69
56
|
highlightLanguages: [
|
|
70
57
|
"bash",
|
|
71
58
|
"console",
|
|
@@ -75,13 +62,13 @@ exports.OptionDefaults = {
|
|
|
75
62
|
"json",
|
|
76
63
|
"jsonc",
|
|
77
64
|
"json5",
|
|
65
|
+
"yaml",
|
|
78
66
|
"tsx",
|
|
79
67
|
"typescript",
|
|
80
68
|
],
|
|
81
|
-
sort: ["kind", "instance-first", "alphabetical"],
|
|
69
|
+
sort: ["kind", "instance-first", "alphabetical-ignoring-documents"],
|
|
82
70
|
kindSortOrder: [
|
|
83
71
|
"Document",
|
|
84
|
-
"Reference",
|
|
85
72
|
"Project",
|
|
86
73
|
"Module",
|
|
87
74
|
"Namespace",
|
|
@@ -96,14 +83,7 @@ exports.OptionDefaults = {
|
|
|
96
83
|
"Function",
|
|
97
84
|
"Accessor",
|
|
98
85
|
"Method",
|
|
99
|
-
"
|
|
100
|
-
"TypeParameter",
|
|
101
|
-
"TypeLiteral",
|
|
102
|
-
"CallSignature",
|
|
103
|
-
"ConstructorSignature",
|
|
104
|
-
"IndexSignature",
|
|
105
|
-
"GetSignature",
|
|
106
|
-
"SetSignature",
|
|
86
|
+
"Reference",
|
|
107
87
|
],
|
|
108
88
|
requiredToBeDocumented: [
|
|
109
89
|
"Enum",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Options } from "./options";
|
|
2
|
-
import type { TranslationProxy } from "../../internationalization/internationalization";
|
|
1
|
+
import type { Options } from "./options.js";
|
|
2
|
+
import type { TranslationProxy } from "../../internationalization/internationalization.js";
|
|
3
3
|
export interface ParameterHelp {
|
|
4
4
|
names: string[];
|
|
5
5
|
helps: string[];
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getOptionsHelp = getOptionsHelp;
|
|
4
|
-
const declaration_1 = require("./declaration");
|
|
5
|
-
const highlighter_1 = require("../highlighter");
|
|
1
|
+
import { ParameterHint, ParameterType, } from "./declaration.js";
|
|
2
|
+
import { getSupportedLanguagesWithoutAliases, getSupportedThemes, } from "../highlighter.js";
|
|
6
3
|
function hasHint(parameter) {
|
|
7
|
-
return ((parameter.type ??
|
|
4
|
+
return ((parameter.type ?? ParameterType.String) === ParameterType.String &&
|
|
8
5
|
"hint" in parameter);
|
|
9
6
|
}
|
|
10
7
|
/**
|
|
@@ -25,7 +22,7 @@ function getParameterHelp(options, i18n) {
|
|
|
25
22
|
}
|
|
26
23
|
let name = " --" + parameter.name;
|
|
27
24
|
if (hasHint(parameter)) {
|
|
28
|
-
name += " " +
|
|
25
|
+
name += " " + ParameterHint[parameter.hint].toUpperCase();
|
|
29
26
|
}
|
|
30
27
|
names.push(name);
|
|
31
28
|
helps.push(typeof parameter.help === "string"
|
|
@@ -52,7 +49,7 @@ function toEvenColumns(values, maxLineWidth) {
|
|
|
52
49
|
}
|
|
53
50
|
return out;
|
|
54
51
|
}
|
|
55
|
-
function getOptionsHelp(options, i18n) {
|
|
52
|
+
export function getOptionsHelp(options, i18n) {
|
|
56
53
|
const output = ["typedoc path/to/entry.ts", "", "Options:"];
|
|
57
54
|
const columns = getParameterHelp(options, i18n);
|
|
58
55
|
for (let i = 0; i < columns.names.length; i++) {
|
|
@@ -60,7 +57,7 @@ function getOptionsHelp(options, i18n) {
|
|
|
60
57
|
const description = columns.helps[i];
|
|
61
58
|
output.push(usage.padEnd(columns.margin + 2) + description);
|
|
62
59
|
}
|
|
63
|
-
output.push("", "Supported highlighting languages:", ...toEvenColumns(
|
|
64
|
-
output.push("", "Supported highlighting themes:", ...toEvenColumns(
|
|
60
|
+
output.push("", "Supported highlighting languages:", ...toEvenColumns(getSupportedLanguagesWithoutAliases(), 80));
|
|
61
|
+
output.push("", "Supported highlighting themes:", ...toEvenColumns(getSupportedThemes(), 80));
|
|
65
62
|
return output.join("\n");
|
|
66
63
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Options, Option } from "./options";
|
|
2
|
-
export type { OptionsReader } from "./options";
|
|
3
|
-
export { ArgumentsReader, PackageJsonReader, TypeDocReader, TSConfigReader, } from "./readers";
|
|
4
|
-
export { CommentStyle, EmitStrategy, ParameterType, ParameterHint, } from "./declaration";
|
|
5
|
-
export type { TypeDocOptions, TypeDocOptionMap, ValidationOptions, KeyToDeclaration, DeclarationOption, DeclarationOptionBase, StringDeclarationOption, NumberDeclarationOption, BooleanDeclarationOption, ArrayDeclarationOption, MixedDeclarationOption, ObjectDeclarationOption, MapDeclarationOption, FlagsDeclarationOption, DeclarationOptionToOptionType, TypeDocOptionValues, ParameterTypeToOptionTypeMap, ManuallyValidatedOption, JsDocCompatibility, } from "./declaration";
|
|
6
|
-
export { OptionDefaults } from "./defaults";
|
|
1
|
+
export { Options, Option } from "./options.js";
|
|
2
|
+
export type { OptionsReader } from "./options.js";
|
|
3
|
+
export { ArgumentsReader, PackageJsonReader, TypeDocReader, TSConfigReader, } from "./readers/index.js";
|
|
4
|
+
export { CommentStyle, EmitStrategy, ParameterType, ParameterHint, } from "./declaration.js";
|
|
5
|
+
export type { TypeDocOptions, TypeDocOptionMap, ValidationOptions, KeyToDeclaration, DeclarationOption, DeclarationOptionBase, StringDeclarationOption, NumberDeclarationOption, BooleanDeclarationOption, ArrayDeclarationOption, MixedDeclarationOption, ObjectDeclarationOption, MapDeclarationOption, FlagsDeclarationOption, DeclarationOptionToOptionType, TypeDocOptionValues, ParameterTypeToOptionTypeMap, ManuallyValidatedOption, JsDocCompatibility, OutputSpecification, } from "./declaration.js";
|
|
6
|
+
export { OptionDefaults } from "./defaults.js";
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "Options", { enumerable: true, get: function () { return options_1.Options; } });
|
|
6
|
-
Object.defineProperty(exports, "Option", { enumerable: true, get: function () { return options_1.Option; } });
|
|
7
|
-
var readers_1 = require("./readers");
|
|
8
|
-
Object.defineProperty(exports, "ArgumentsReader", { enumerable: true, get: function () { return readers_1.ArgumentsReader; } });
|
|
9
|
-
Object.defineProperty(exports, "PackageJsonReader", { enumerable: true, get: function () { return readers_1.PackageJsonReader; } });
|
|
10
|
-
Object.defineProperty(exports, "TypeDocReader", { enumerable: true, get: function () { return readers_1.TypeDocReader; } });
|
|
11
|
-
Object.defineProperty(exports, "TSConfigReader", { enumerable: true, get: function () { return readers_1.TSConfigReader; } });
|
|
12
|
-
var declaration_1 = require("./declaration");
|
|
13
|
-
Object.defineProperty(exports, "CommentStyle", { enumerable: true, get: function () { return declaration_1.CommentStyle; } });
|
|
14
|
-
Object.defineProperty(exports, "EmitStrategy", { enumerable: true, get: function () { return declaration_1.EmitStrategy; } });
|
|
15
|
-
Object.defineProperty(exports, "ParameterType", { enumerable: true, get: function () { return declaration_1.ParameterType; } });
|
|
16
|
-
Object.defineProperty(exports, "ParameterHint", { enumerable: true, get: function () { return declaration_1.ParameterHint; } });
|
|
17
|
-
var defaults_1 = require("./defaults");
|
|
18
|
-
Object.defineProperty(exports, "OptionDefaults", { enumerable: true, get: function () { return defaults_1.OptionDefaults; } });
|
|
1
|
+
export { Options, Option } from "./options.js";
|
|
2
|
+
export { ArgumentsReader, PackageJsonReader, TypeDocReader, TSConfigReader, } from "./readers/index.js";
|
|
3
|
+
export { CommentStyle, EmitStrategy, ParameterType, ParameterHint, } from "./declaration.js";
|
|
4
|
+
export { OptionDefaults } from "./defaults.js";
|