typedoc 0.26.11 → 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 +154 -172
- 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 +47 -36
- 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.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 +44 -76
- 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 +7 -10
- 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,62 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
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.addTypeDocOptions = addTypeDocOptions;
|
|
27
|
-
const loggers_1 = require("../../loggers");
|
|
28
|
-
const declaration_1 = require("../declaration");
|
|
29
|
-
const sort_1 = require("../../sort");
|
|
30
|
-
const entry_point_1 = require("../../entry-point");
|
|
31
|
-
const kind_1 = require("../../../models/reflections/kind");
|
|
32
|
-
const Validation = __importStar(require("../../validation"));
|
|
33
|
-
const enum_1 = require("../../enum");
|
|
34
|
-
const highlighter_1 = require("../../highlighter");
|
|
35
|
-
const set_1 = require("../../set");
|
|
36
|
-
const defaults_1 = require("../defaults");
|
|
1
|
+
import { LogLevel } from "../../loggers.js";
|
|
2
|
+
import { ParameterType, ParameterHint, EmitStrategy, CommentStyle, } from "../declaration.js";
|
|
3
|
+
import { OptionDefaults } from "../defaults.js";
|
|
4
|
+
import { SORT_STRATEGIES } from "../../sort.js";
|
|
5
|
+
import { EntryPointStrategy } from "../../entry-point.js";
|
|
6
|
+
import { ReflectionKind } from "../../../models/reflections/kind.js";
|
|
7
|
+
import * as Validation from "../../validation.js";
|
|
8
|
+
import { blockTags, inlineTags, modifierTags } from "../tsdoc-defaults.js";
|
|
9
|
+
import { getEnumKeys } from "../../enum.js";
|
|
10
|
+
import { getSupportedLanguagesWithoutAliases, getSupportedThemes, } from "../../highlighter.js";
|
|
11
|
+
import { setDifference } from "../../set.js";
|
|
12
|
+
import { extname } from "path";
|
|
13
|
+
function makeTagArrayValidator(name) {
|
|
14
|
+
return (value, i18n) => {
|
|
15
|
+
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
16
|
+
throw new Error(i18n.option_0_values_must_be_array_of_tags(name));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
37
20
|
// For convenience, added in the same order as they are documented on the website.
|
|
38
|
-
function addTypeDocOptions(options) {
|
|
21
|
+
export function addTypeDocOptions(options) {
|
|
39
22
|
///////////////////////////
|
|
40
23
|
// Configuration Options //
|
|
41
24
|
///////////////////////////
|
|
42
25
|
options.addDeclaration({
|
|
43
|
-
type:
|
|
26
|
+
type: ParameterType.Path,
|
|
44
27
|
name: "options",
|
|
45
28
|
help: (i18n) => i18n.help_options(),
|
|
46
|
-
hint:
|
|
29
|
+
hint: ParameterHint.File,
|
|
47
30
|
defaultValue: "",
|
|
48
31
|
});
|
|
49
32
|
options.addDeclaration({
|
|
50
|
-
type:
|
|
33
|
+
type: ParameterType.Path,
|
|
51
34
|
name: "tsconfig",
|
|
52
35
|
help: (i18n) => i18n.help_tsconfig(),
|
|
53
|
-
hint:
|
|
36
|
+
hint: ParameterHint.File,
|
|
54
37
|
defaultValue: "",
|
|
55
38
|
});
|
|
56
39
|
options.addDeclaration({
|
|
57
40
|
name: "compilerOptions",
|
|
58
41
|
help: (i18n) => i18n.help_compilerOptions(),
|
|
59
|
-
type:
|
|
42
|
+
type: ParameterType.Mixed,
|
|
60
43
|
configFileOnly: true,
|
|
61
44
|
validate(value, i18n) {
|
|
62
45
|
if (!Validation.validate({}, value)) {
|
|
@@ -67,13 +50,13 @@ function addTypeDocOptions(options) {
|
|
|
67
50
|
options.addDeclaration({
|
|
68
51
|
name: "lang",
|
|
69
52
|
help: (i18n) => i18n.help_lang(),
|
|
70
|
-
type:
|
|
53
|
+
type: ParameterType.String,
|
|
71
54
|
defaultValue: "en",
|
|
72
55
|
});
|
|
73
56
|
options.addDeclaration({
|
|
74
57
|
name: "locales",
|
|
75
58
|
help: (i18n) => i18n.help_locales(),
|
|
76
|
-
type:
|
|
59
|
+
type: ParameterType.Mixed,
|
|
77
60
|
configFileOnly: true,
|
|
78
61
|
defaultValue: {},
|
|
79
62
|
validate(value, i18n) {
|
|
@@ -95,7 +78,7 @@ function addTypeDocOptions(options) {
|
|
|
95
78
|
options.addDeclaration({
|
|
96
79
|
name: "packageOptions",
|
|
97
80
|
help: (i18n) => i18n.help_packageOptions(),
|
|
98
|
-
type:
|
|
81
|
+
type: ParameterType.Mixed,
|
|
99
82
|
configFileOnly: true,
|
|
100
83
|
defaultValue: {},
|
|
101
84
|
validate(value, i18n) {
|
|
@@ -110,60 +93,60 @@ function addTypeDocOptions(options) {
|
|
|
110
93
|
options.addDeclaration({
|
|
111
94
|
name: "entryPoints",
|
|
112
95
|
help: (i18n) => i18n.help_entryPoints(),
|
|
113
|
-
type:
|
|
96
|
+
type: ParameterType.GlobArray,
|
|
114
97
|
});
|
|
115
98
|
options.addDeclaration({
|
|
116
99
|
name: "entryPointStrategy",
|
|
117
100
|
help: (i18n) => i18n.help_entryPointStrategy(),
|
|
118
|
-
type:
|
|
119
|
-
map:
|
|
120
|
-
defaultValue:
|
|
101
|
+
type: ParameterType.Map,
|
|
102
|
+
map: EntryPointStrategy,
|
|
103
|
+
defaultValue: EntryPointStrategy.Resolve,
|
|
121
104
|
});
|
|
122
105
|
options.addDeclaration({
|
|
123
106
|
name: "alwaysCreateEntryPointModule",
|
|
124
107
|
help: (i18n) => i18n.help_alwaysCreateEntryPointModule(),
|
|
125
|
-
type:
|
|
108
|
+
type: ParameterType.Boolean,
|
|
126
109
|
});
|
|
127
110
|
options.addDeclaration({
|
|
128
111
|
name: "projectDocuments",
|
|
129
112
|
help: (i18n) => i18n.help_projectDocuments(),
|
|
130
|
-
type:
|
|
113
|
+
type: ParameterType.GlobArray,
|
|
131
114
|
});
|
|
132
115
|
options.addDeclaration({
|
|
133
116
|
name: "exclude",
|
|
134
117
|
help: (i18n) => i18n.help_exclude(),
|
|
135
|
-
type:
|
|
118
|
+
type: ParameterType.GlobArray,
|
|
136
119
|
});
|
|
137
120
|
options.addDeclaration({
|
|
138
121
|
name: "externalPattern",
|
|
139
122
|
help: (i18n) => i18n.help_externalPattern(),
|
|
140
|
-
type:
|
|
123
|
+
type: ParameterType.GlobArray,
|
|
141
124
|
defaultValue: ["**/node_modules/**"],
|
|
142
125
|
});
|
|
143
126
|
options.addDeclaration({
|
|
144
127
|
name: "excludeExternals",
|
|
145
128
|
help: (i18n) => i18n.help_excludeExternals(),
|
|
146
|
-
type:
|
|
129
|
+
type: ParameterType.Boolean,
|
|
147
130
|
});
|
|
148
131
|
options.addDeclaration({
|
|
149
132
|
name: "excludeNotDocumented",
|
|
150
133
|
help: (i18n) => i18n.help_excludeNotDocumented(),
|
|
151
|
-
type:
|
|
134
|
+
type: ParameterType.Boolean,
|
|
152
135
|
});
|
|
153
136
|
options.addDeclaration({
|
|
154
137
|
name: "excludeNotDocumentedKinds",
|
|
155
138
|
help: (i18n) => i18n.help_excludeNotDocumentedKinds(),
|
|
156
|
-
type:
|
|
139
|
+
type: ParameterType.Array,
|
|
157
140
|
validate(value, i18n) {
|
|
158
141
|
const invalid = new Set(value);
|
|
159
|
-
const valid = new Set(
|
|
142
|
+
const valid = new Set(getEnumKeys(ReflectionKind));
|
|
160
143
|
for (const notPermitted of [
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
144
|
+
ReflectionKind.Project,
|
|
145
|
+
ReflectionKind.TypeLiteral,
|
|
146
|
+
ReflectionKind.TypeParameter,
|
|
147
|
+
ReflectionKind.Parameter,
|
|
165
148
|
]) {
|
|
166
|
-
valid.delete(
|
|
149
|
+
valid.delete(ReflectionKind[notPermitted]);
|
|
167
150
|
}
|
|
168
151
|
for (const v of valid) {
|
|
169
152
|
invalid.delete(v);
|
|
@@ -172,39 +155,39 @@ function addTypeDocOptions(options) {
|
|
|
172
155
|
throw new Error(i18n.exclude_not_documented_specified_0_valid_values_are_1(Array.from(invalid).join(", "), Array.from(valid).join(", ")));
|
|
173
156
|
}
|
|
174
157
|
},
|
|
175
|
-
defaultValue:
|
|
158
|
+
defaultValue: OptionDefaults.excludeNotDocumentedKinds,
|
|
176
159
|
});
|
|
177
160
|
options.addDeclaration({
|
|
178
161
|
name: "excludeInternal",
|
|
179
162
|
help: (i18n) => i18n.help_excludeInternal(),
|
|
180
|
-
type:
|
|
163
|
+
type: ParameterType.Boolean,
|
|
181
164
|
});
|
|
182
165
|
options.addDeclaration({
|
|
183
166
|
name: "excludeCategories",
|
|
184
167
|
help: (i18n) => i18n.help_excludeCategories(),
|
|
185
|
-
type:
|
|
168
|
+
type: ParameterType.Array,
|
|
186
169
|
defaultValue: [],
|
|
187
170
|
});
|
|
188
171
|
options.addDeclaration({
|
|
189
172
|
name: "excludePrivate",
|
|
190
173
|
help: (i18n) => i18n.help_excludePrivate(),
|
|
191
|
-
type:
|
|
174
|
+
type: ParameterType.Boolean,
|
|
192
175
|
defaultValue: true,
|
|
193
176
|
});
|
|
194
177
|
options.addDeclaration({
|
|
195
178
|
name: "excludeProtected",
|
|
196
179
|
help: (i18n) => i18n.help_excludeProtected(),
|
|
197
|
-
type:
|
|
180
|
+
type: ParameterType.Boolean,
|
|
198
181
|
});
|
|
199
182
|
options.addDeclaration({
|
|
200
183
|
name: "excludeReferences",
|
|
201
184
|
help: (i18n) => i18n.help_excludeReferences(),
|
|
202
|
-
type:
|
|
185
|
+
type: ParameterType.Boolean,
|
|
203
186
|
});
|
|
204
187
|
options.addDeclaration({
|
|
205
188
|
name: "externalSymbolLinkMappings",
|
|
206
189
|
help: (i18n) => i18n.help_externalSymbolLinkMappings(),
|
|
207
|
-
type:
|
|
190
|
+
type: ParameterType.Mixed,
|
|
208
191
|
defaultValue: {},
|
|
209
192
|
validate(value, i18n) {
|
|
210
193
|
if (!Validation.validate({}, value)) {
|
|
@@ -225,36 +208,59 @@ function addTypeDocOptions(options) {
|
|
|
225
208
|
///////////////////////////
|
|
226
209
|
///// Output Options //////
|
|
227
210
|
///////////////////////////
|
|
211
|
+
options.addDeclaration({
|
|
212
|
+
name: "outputs",
|
|
213
|
+
help: (i18n) => i18n.help_out(),
|
|
214
|
+
type: ParameterType.Mixed,
|
|
215
|
+
configFileOnly: true,
|
|
216
|
+
defaultValue: undefined,
|
|
217
|
+
validate(value, i18n) {
|
|
218
|
+
if (!Validation.validate([
|
|
219
|
+
Array,
|
|
220
|
+
{
|
|
221
|
+
name: String,
|
|
222
|
+
path: String,
|
|
223
|
+
options: Validation.optional({
|
|
224
|
+
[Validation.additionalProperties]: true,
|
|
225
|
+
}),
|
|
226
|
+
},
|
|
227
|
+
], value)) {
|
|
228
|
+
throw new Error(i18n.option_outputs_must_be_array());
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
});
|
|
228
232
|
options.addDeclaration({
|
|
229
233
|
name: "out",
|
|
234
|
+
outputShortcut: "html",
|
|
230
235
|
help: (i18n) => i18n.help_out(),
|
|
231
|
-
type:
|
|
232
|
-
hint:
|
|
236
|
+
type: ParameterType.Path,
|
|
237
|
+
hint: ParameterHint.Directory,
|
|
233
238
|
defaultValue: "./docs",
|
|
234
239
|
});
|
|
235
240
|
options.addDeclaration({
|
|
236
241
|
name: "json",
|
|
242
|
+
outputShortcut: "json",
|
|
237
243
|
help: (i18n) => i18n.help_json(),
|
|
238
|
-
type:
|
|
239
|
-
hint:
|
|
244
|
+
type: ParameterType.Path,
|
|
245
|
+
hint: ParameterHint.File,
|
|
240
246
|
});
|
|
241
247
|
options.addDeclaration({
|
|
242
248
|
name: "pretty",
|
|
243
249
|
help: (i18n) => i18n.help_pretty(),
|
|
244
|
-
type:
|
|
250
|
+
type: ParameterType.Boolean,
|
|
245
251
|
defaultValue: true,
|
|
246
252
|
});
|
|
247
253
|
options.addDeclaration({
|
|
248
254
|
name: "emit",
|
|
249
255
|
help: (i18n) => i18n.help_emit(),
|
|
250
|
-
type:
|
|
251
|
-
map:
|
|
256
|
+
type: ParameterType.Map,
|
|
257
|
+
map: EmitStrategy,
|
|
252
258
|
defaultValue: "docs",
|
|
253
259
|
});
|
|
254
260
|
options.addDeclaration({
|
|
255
261
|
name: "theme",
|
|
256
262
|
help: (i18n) => i18n.help_theme(),
|
|
257
|
-
type:
|
|
263
|
+
type: ParameterType.String,
|
|
258
264
|
defaultValue: "default",
|
|
259
265
|
});
|
|
260
266
|
const defaultLightTheme = "light-plus";
|
|
@@ -262,51 +268,57 @@ function addTypeDocOptions(options) {
|
|
|
262
268
|
options.addDeclaration({
|
|
263
269
|
name: "lightHighlightTheme",
|
|
264
270
|
help: (i18n) => i18n.help_lightHighlightTheme(),
|
|
265
|
-
type:
|
|
271
|
+
type: ParameterType.String,
|
|
266
272
|
defaultValue: defaultLightTheme,
|
|
267
273
|
validate(value, i18n) {
|
|
268
|
-
if (!
|
|
269
|
-
throw new Error(i18n.highlight_theme_0_must_be_one_of_1("lightHighlightTheme",
|
|
274
|
+
if (!getSupportedThemes().includes(value)) {
|
|
275
|
+
throw new Error(i18n.highlight_theme_0_must_be_one_of_1("lightHighlightTheme", getSupportedThemes().join(", ")));
|
|
270
276
|
}
|
|
271
277
|
},
|
|
272
278
|
});
|
|
273
279
|
options.addDeclaration({
|
|
274
280
|
name: "darkHighlightTheme",
|
|
275
281
|
help: (i18n) => i18n.help_darkHighlightTheme(),
|
|
276
|
-
type:
|
|
282
|
+
type: ParameterType.String,
|
|
277
283
|
defaultValue: defaultDarkTheme,
|
|
278
284
|
validate(value, i18n) {
|
|
279
|
-
if (!
|
|
280
|
-
throw new Error(i18n.highlight_theme_0_must_be_one_of_1("darkHighlightTheme",
|
|
285
|
+
if (!getSupportedThemes().includes(value)) {
|
|
286
|
+
throw new Error(i18n.highlight_theme_0_must_be_one_of_1("darkHighlightTheme", getSupportedThemes().join(", ")));
|
|
281
287
|
}
|
|
282
288
|
},
|
|
283
289
|
});
|
|
284
290
|
options.addDeclaration({
|
|
285
291
|
name: "highlightLanguages",
|
|
286
292
|
help: (i18n) => i18n.help_highlightLanguages(),
|
|
287
|
-
type:
|
|
288
|
-
defaultValue:
|
|
293
|
+
type: ParameterType.Array,
|
|
294
|
+
defaultValue: OptionDefaults.highlightLanguages,
|
|
289
295
|
validate(value, i18n) {
|
|
290
|
-
const invalid =
|
|
296
|
+
const invalid = setDifference(value, getSupportedLanguagesWithoutAliases());
|
|
291
297
|
if (invalid.size) {
|
|
292
298
|
throw new Error(i18n.highlightLanguages_contains_invalid_languages_0(Array.from(invalid).join(", ")));
|
|
293
299
|
}
|
|
294
300
|
},
|
|
295
301
|
});
|
|
302
|
+
options.addDeclaration({
|
|
303
|
+
name: "typePrintWidth",
|
|
304
|
+
help: (i18n) => i18n.help_typePrintWidth(),
|
|
305
|
+
type: ParameterType.Number,
|
|
306
|
+
defaultValue: 80,
|
|
307
|
+
});
|
|
296
308
|
options.addDeclaration({
|
|
297
309
|
name: "customCss",
|
|
298
310
|
help: (i18n) => i18n.help_customCss(),
|
|
299
|
-
type:
|
|
311
|
+
type: ParameterType.Path,
|
|
300
312
|
});
|
|
301
313
|
options.addDeclaration({
|
|
302
314
|
name: "customJs",
|
|
303
315
|
help: (i18n) => i18n.help_customJs(),
|
|
304
|
-
type:
|
|
316
|
+
type: ParameterType.Path,
|
|
305
317
|
});
|
|
306
318
|
options.addDeclaration({
|
|
307
319
|
name: "markdownItOptions",
|
|
308
320
|
help: (i18n) => i18n.help_markdownItOptions(),
|
|
309
|
-
type:
|
|
321
|
+
type: ParameterType.Mixed,
|
|
310
322
|
configFileOnly: true,
|
|
311
323
|
defaultValue: {
|
|
312
324
|
html: true,
|
|
@@ -321,7 +333,7 @@ function addTypeDocOptions(options) {
|
|
|
321
333
|
options.addDeclaration({
|
|
322
334
|
name: "markdownItLoader",
|
|
323
335
|
help: (i18n) => i18n.help_markdownItLoader(),
|
|
324
|
-
type:
|
|
336
|
+
type: ParameterType.Mixed,
|
|
325
337
|
configFileOnly: true,
|
|
326
338
|
defaultValue: () => { },
|
|
327
339
|
validate(value, i18n) {
|
|
@@ -334,7 +346,7 @@ function addTypeDocOptions(options) {
|
|
|
334
346
|
name: "maxTypeConversionDepth",
|
|
335
347
|
help: (i18n) => i18n.help_maxTypeConversionDepth(),
|
|
336
348
|
defaultValue: 10,
|
|
337
|
-
type:
|
|
349
|
+
type: ParameterType.Number,
|
|
338
350
|
});
|
|
339
351
|
options.addDeclaration({
|
|
340
352
|
name: "name",
|
|
@@ -343,12 +355,12 @@ function addTypeDocOptions(options) {
|
|
|
343
355
|
options.addDeclaration({
|
|
344
356
|
name: "includeVersion",
|
|
345
357
|
help: (i18n) => i18n.help_includeVersion(),
|
|
346
|
-
type:
|
|
358
|
+
type: ParameterType.Boolean,
|
|
347
359
|
});
|
|
348
360
|
options.addDeclaration({
|
|
349
361
|
name: "disableSources",
|
|
350
362
|
help: (i18n) => i18n.help_disableSources(),
|
|
351
|
-
type:
|
|
363
|
+
type: ParameterType.Boolean,
|
|
352
364
|
});
|
|
353
365
|
options.addDeclaration({
|
|
354
366
|
name: "sourceLinkTemplate",
|
|
@@ -366,48 +378,47 @@ function addTypeDocOptions(options) {
|
|
|
366
378
|
options.addDeclaration({
|
|
367
379
|
name: "disableGit",
|
|
368
380
|
help: (i18n) => i18n.help_disableGit(),
|
|
369
|
-
type:
|
|
381
|
+
type: ParameterType.Boolean,
|
|
370
382
|
});
|
|
371
383
|
options.addDeclaration({
|
|
372
384
|
name: "basePath",
|
|
373
385
|
help: (i18n) => i18n.help_basePath(),
|
|
374
|
-
type:
|
|
375
|
-
});
|
|
376
|
-
options.addDeclaration({
|
|
377
|
-
name: "excludeTags",
|
|
378
|
-
help: (i18n) => i18n.help_excludeTags(),
|
|
379
|
-
type: declaration_1.ParameterType.Array,
|
|
380
|
-
defaultValue: defaults_1.OptionDefaults.excludeTags,
|
|
381
|
-
validate(value, i18n) {
|
|
382
|
-
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
383
|
-
throw new Error(i18n.option_0_values_must_be_array_of_tags("excludeTags"));
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
+
type: ParameterType.Path,
|
|
386
387
|
});
|
|
387
388
|
options.addDeclaration({
|
|
388
389
|
name: "readme",
|
|
389
390
|
help: (i18n) => i18n.help_readme(),
|
|
390
|
-
type:
|
|
391
|
+
type: ParameterType.Path,
|
|
391
392
|
});
|
|
392
393
|
options.addDeclaration({
|
|
393
394
|
name: "cname",
|
|
394
395
|
help: (i18n) => i18n.help_cname(),
|
|
395
396
|
});
|
|
397
|
+
options.addDeclaration({
|
|
398
|
+
name: "favicon",
|
|
399
|
+
help: (i18n) => i18n.help_favicon(),
|
|
400
|
+
validate(value, i18n) {
|
|
401
|
+
if (![".ico", ".svg"].includes(extname(value))) {
|
|
402
|
+
throw new Error(i18n.favicon_must_be_ico_or_svg());
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
type: ParameterType.Path,
|
|
406
|
+
});
|
|
396
407
|
options.addDeclaration({
|
|
397
408
|
name: "sourceLinkExternal",
|
|
398
409
|
help: (i18n) => i18n.help_sourceLinkExternal(),
|
|
399
|
-
type:
|
|
410
|
+
type: ParameterType.Boolean,
|
|
400
411
|
});
|
|
401
412
|
options.addDeclaration({
|
|
402
413
|
name: "markdownLinkExternal",
|
|
403
414
|
help: (i18n) => i18n.help_markdownLinkExternal(),
|
|
404
|
-
type:
|
|
415
|
+
type: ParameterType.Boolean,
|
|
405
416
|
defaultValue: true,
|
|
406
417
|
});
|
|
407
418
|
options.addDeclaration({
|
|
408
419
|
name: "githubPages",
|
|
409
420
|
help: (i18n) => i18n.help_githubPages(),
|
|
410
|
-
type:
|
|
421
|
+
type: ParameterType.Boolean,
|
|
411
422
|
defaultValue: true,
|
|
412
423
|
});
|
|
413
424
|
options.addDeclaration({
|
|
@@ -422,59 +433,53 @@ function addTypeDocOptions(options) {
|
|
|
422
433
|
options.addDeclaration({
|
|
423
434
|
name: "useHostedBaseUrlForAbsoluteLinks",
|
|
424
435
|
help: (i18n) => i18n.help_useHostedBaseUrlForAbsoluteLinks(),
|
|
425
|
-
type:
|
|
436
|
+
type: ParameterType.Boolean,
|
|
426
437
|
});
|
|
427
438
|
options.addDeclaration({
|
|
428
439
|
name: "hideGenerator",
|
|
429
440
|
help: (i18n) => i18n.help_hideGenerator(),
|
|
430
|
-
type:
|
|
441
|
+
type: ParameterType.Boolean,
|
|
431
442
|
});
|
|
432
443
|
options.addDeclaration({
|
|
433
444
|
name: "customFooterHtml",
|
|
434
445
|
help: (i18n) => i18n.help_customFooterHtml(),
|
|
435
|
-
type:
|
|
446
|
+
type: ParameterType.String,
|
|
436
447
|
});
|
|
437
448
|
options.addDeclaration({
|
|
438
449
|
name: "customFooterHtmlDisableWrapper",
|
|
439
450
|
help: (i18n) => i18n.help_customFooterHtmlDisableWrapper(),
|
|
440
|
-
type:
|
|
441
|
-
});
|
|
442
|
-
options.addDeclaration({
|
|
443
|
-
name: "hideParameterTypesInTitle",
|
|
444
|
-
help: (i18n) => i18n.help_hideParameterTypesInTitle(),
|
|
445
|
-
type: declaration_1.ParameterType.Boolean,
|
|
446
|
-
defaultValue: true,
|
|
451
|
+
type: ParameterType.Boolean,
|
|
447
452
|
});
|
|
448
453
|
options.addDeclaration({
|
|
449
454
|
name: "cacheBust",
|
|
450
455
|
help: (i18n) => i18n.help_cacheBust(),
|
|
451
|
-
type:
|
|
456
|
+
type: ParameterType.Boolean,
|
|
452
457
|
});
|
|
453
458
|
options.addDeclaration({
|
|
454
459
|
name: "searchInComments",
|
|
455
460
|
help: (i18n) => i18n.help_searchInComments(),
|
|
456
|
-
type:
|
|
461
|
+
type: ParameterType.Boolean,
|
|
457
462
|
});
|
|
458
463
|
options.addDeclaration({
|
|
459
464
|
name: "searchInDocuments",
|
|
460
465
|
help: (i18n) => i18n.help_searchInDocuments(),
|
|
461
|
-
type:
|
|
466
|
+
type: ParameterType.Boolean,
|
|
462
467
|
});
|
|
463
468
|
options.addDeclaration({
|
|
464
469
|
name: "cleanOutputDir",
|
|
465
470
|
help: (i18n) => i18n.help_cleanOutputDir(),
|
|
466
|
-
type:
|
|
471
|
+
type: ParameterType.Boolean,
|
|
467
472
|
defaultValue: true,
|
|
468
473
|
});
|
|
469
474
|
options.addDeclaration({
|
|
470
475
|
name: "titleLink",
|
|
471
476
|
help: (i18n) => i18n.help_titleLink(),
|
|
472
|
-
type:
|
|
477
|
+
type: ParameterType.String,
|
|
473
478
|
});
|
|
474
479
|
options.addDeclaration({
|
|
475
480
|
name: "navigationLinks",
|
|
476
481
|
help: (i18n) => i18n.help_navigationLinks(),
|
|
477
|
-
type:
|
|
482
|
+
type: ParameterType.Mixed,
|
|
478
483
|
defaultValue: {},
|
|
479
484
|
validate(value, i18n) {
|
|
480
485
|
if (!isObject(value)) {
|
|
@@ -488,7 +493,7 @@ function addTypeDocOptions(options) {
|
|
|
488
493
|
options.addDeclaration({
|
|
489
494
|
name: "sidebarLinks",
|
|
490
495
|
help: (i18n) => i18n.help_sidebarLinks(),
|
|
491
|
-
type:
|
|
496
|
+
type: ParameterType.Mixed,
|
|
492
497
|
defaultValue: {},
|
|
493
498
|
validate(value, i18n) {
|
|
494
499
|
if (!isObject(value)) {
|
|
@@ -502,12 +507,12 @@ function addTypeDocOptions(options) {
|
|
|
502
507
|
options.addDeclaration({
|
|
503
508
|
name: "navigationLeaves",
|
|
504
509
|
help: (i18n) => i18n.help_navigationLeaves(),
|
|
505
|
-
type:
|
|
510
|
+
type: ParameterType.Array,
|
|
506
511
|
});
|
|
507
512
|
options.addDeclaration({
|
|
508
513
|
name: "navigation",
|
|
509
514
|
help: (i18n) => i18n.help_navigation(),
|
|
510
|
-
type:
|
|
515
|
+
type: ParameterType.Flags,
|
|
511
516
|
defaults: {
|
|
512
517
|
includeCategories: false,
|
|
513
518
|
includeGroups: false,
|
|
@@ -519,16 +524,24 @@ function addTypeDocOptions(options) {
|
|
|
519
524
|
options.addDeclaration({
|
|
520
525
|
name: "headings",
|
|
521
526
|
help: (i18n) => i18n.help_headings(),
|
|
522
|
-
type:
|
|
527
|
+
type: ParameterType.Flags,
|
|
523
528
|
defaults: {
|
|
524
529
|
readme: true,
|
|
525
530
|
document: false,
|
|
526
531
|
},
|
|
527
532
|
});
|
|
533
|
+
options.addDeclaration({
|
|
534
|
+
name: "sluggerConfiguration",
|
|
535
|
+
help: (i18n) => i18n.help_sluggerConfiguration(),
|
|
536
|
+
type: ParameterType.Flags,
|
|
537
|
+
defaults: {
|
|
538
|
+
lowercase: true,
|
|
539
|
+
},
|
|
540
|
+
});
|
|
528
541
|
options.addDeclaration({
|
|
529
542
|
name: "visibilityFilters",
|
|
530
543
|
help: (i18n) => i18n.help_visibilityFilters(),
|
|
531
|
-
type:
|
|
544
|
+
type: ParameterType.Mixed,
|
|
532
545
|
configFileOnly: true,
|
|
533
546
|
defaultValue: {
|
|
534
547
|
protected: false,
|
|
@@ -554,7 +567,7 @@ function addTypeDocOptions(options) {
|
|
|
554
567
|
options.addDeclaration({
|
|
555
568
|
name: "searchCategoryBoosts",
|
|
556
569
|
help: (i18n) => i18n.help_searchCategoryBoosts(),
|
|
557
|
-
type:
|
|
570
|
+
type: ParameterType.Mixed,
|
|
558
571
|
configFileOnly: true,
|
|
559
572
|
defaultValue: {},
|
|
560
573
|
validate(value, i18n) {
|
|
@@ -569,7 +582,7 @@ function addTypeDocOptions(options) {
|
|
|
569
582
|
options.addDeclaration({
|
|
570
583
|
name: "searchGroupBoosts",
|
|
571
584
|
help: (i18n) => i18n.help_searchGroupBoosts(),
|
|
572
|
-
type:
|
|
585
|
+
type: ParameterType.Mixed,
|
|
573
586
|
configFileOnly: true,
|
|
574
587
|
defaultValue: {},
|
|
575
588
|
validate(value, i18n) {
|
|
@@ -581,13 +594,18 @@ function addTypeDocOptions(options) {
|
|
|
581
594
|
}
|
|
582
595
|
},
|
|
583
596
|
});
|
|
597
|
+
options.addDeclaration({
|
|
598
|
+
name: "useFirstParagraphOfCommentAsSummary",
|
|
599
|
+
help: (i18n) => i18n.help_useFirstParagraphOfCommentAsSummary(),
|
|
600
|
+
type: ParameterType.Boolean,
|
|
601
|
+
});
|
|
584
602
|
///////////////////////////
|
|
585
603
|
///// Comment Options /////
|
|
586
604
|
///////////////////////////
|
|
587
605
|
options.addDeclaration({
|
|
588
606
|
name: "jsDocCompatibility",
|
|
589
607
|
help: (i18n) => i18n.help_jsDocCompatibility(),
|
|
590
|
-
type:
|
|
608
|
+
type: ParameterType.Flags,
|
|
591
609
|
defaults: {
|
|
592
610
|
defaultTag: true,
|
|
593
611
|
exampleTag: true,
|
|
@@ -598,70 +616,69 @@ function addTypeDocOptions(options) {
|
|
|
598
616
|
options.addDeclaration({
|
|
599
617
|
name: "suppressCommentWarningsInDeclarationFiles",
|
|
600
618
|
help: (i18n) => i18n.help_lang(),
|
|
601
|
-
type:
|
|
619
|
+
type: ParameterType.Boolean,
|
|
620
|
+
defaultValue: true,
|
|
602
621
|
});
|
|
603
622
|
options.addDeclaration({
|
|
604
623
|
name: "commentStyle",
|
|
605
624
|
help: (i18n) => i18n.help_commentStyle(),
|
|
606
|
-
type:
|
|
607
|
-
map:
|
|
608
|
-
defaultValue:
|
|
625
|
+
type: ParameterType.Map,
|
|
626
|
+
map: CommentStyle,
|
|
627
|
+
defaultValue: CommentStyle.JSDoc,
|
|
609
628
|
});
|
|
610
629
|
options.addDeclaration({
|
|
611
630
|
name: "useTsLinkResolution",
|
|
612
631
|
help: (i18n) => i18n.help_useTsLinkResolution(),
|
|
613
|
-
type:
|
|
632
|
+
type: ParameterType.Boolean,
|
|
614
633
|
defaultValue: true,
|
|
615
634
|
});
|
|
616
635
|
options.addDeclaration({
|
|
617
636
|
name: "preserveLinkText",
|
|
618
637
|
help: (i18n) => i18n.help_preserveLinkText(),
|
|
619
|
-
type:
|
|
638
|
+
type: ParameterType.Boolean,
|
|
620
639
|
defaultValue: true,
|
|
621
640
|
});
|
|
622
641
|
options.addDeclaration({
|
|
623
642
|
name: "blockTags",
|
|
624
643
|
help: (i18n) => i18n.help_blockTags(),
|
|
625
|
-
type:
|
|
626
|
-
defaultValue:
|
|
627
|
-
validate(
|
|
628
|
-
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
629
|
-
throw new Error(i18n.option_0_values_must_be_array_of_tags("blockTags"));
|
|
630
|
-
}
|
|
631
|
-
},
|
|
644
|
+
type: ParameterType.Array,
|
|
645
|
+
defaultValue: blockTags,
|
|
646
|
+
validate: makeTagArrayValidator("blockTags"),
|
|
632
647
|
});
|
|
633
648
|
options.addDeclaration({
|
|
634
649
|
name: "inlineTags",
|
|
635
650
|
help: (i18n) => i18n.help_inlineTags(),
|
|
636
|
-
type:
|
|
637
|
-
defaultValue:
|
|
638
|
-
validate(
|
|
639
|
-
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
640
|
-
throw new Error(i18n.option_0_values_must_be_array_of_tags("inlineTags"));
|
|
641
|
-
}
|
|
642
|
-
},
|
|
651
|
+
type: ParameterType.Array,
|
|
652
|
+
defaultValue: inlineTags,
|
|
653
|
+
validate: makeTagArrayValidator("inlineTags"),
|
|
643
654
|
});
|
|
644
655
|
options.addDeclaration({
|
|
645
656
|
name: "modifierTags",
|
|
646
657
|
help: (i18n) => i18n.help_modifierTags(),
|
|
647
|
-
type:
|
|
648
|
-
defaultValue:
|
|
649
|
-
validate(
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
658
|
+
type: ParameterType.Array,
|
|
659
|
+
defaultValue: modifierTags,
|
|
660
|
+
validate: makeTagArrayValidator("modifierTags"),
|
|
661
|
+
});
|
|
662
|
+
options.addDeclaration({
|
|
663
|
+
name: "excludeTags",
|
|
664
|
+
help: (i18n) => i18n.help_excludeTags(),
|
|
665
|
+
type: ParameterType.Array,
|
|
666
|
+
defaultValue: OptionDefaults.excludeTags,
|
|
667
|
+
validate: makeTagArrayValidator("excludeTags"),
|
|
668
|
+
});
|
|
669
|
+
options.addDeclaration({
|
|
670
|
+
name: "notRenderedTags",
|
|
671
|
+
help: (i18n) => i18n.help_notRenderedTags(),
|
|
672
|
+
type: ParameterType.Array,
|
|
673
|
+
defaultValue: OptionDefaults.notRenderedTags,
|
|
674
|
+
validate: makeTagArrayValidator("notRenderedTags"),
|
|
654
675
|
});
|
|
655
676
|
options.addDeclaration({
|
|
656
677
|
name: "cascadedModifierTags",
|
|
657
678
|
help: (i18n) => i18n.help_modifierTags(),
|
|
658
|
-
type:
|
|
659
|
-
defaultValue:
|
|
660
|
-
validate(
|
|
661
|
-
if (!Validation.validate([Array, Validation.isTagString], value)) {
|
|
662
|
-
throw new Error(i18n.option_0_values_must_be_array_of_tags("cascadedModifierTags"));
|
|
663
|
-
}
|
|
664
|
-
},
|
|
679
|
+
type: ParameterType.Array,
|
|
680
|
+
defaultValue: OptionDefaults.cascadedModifierTags,
|
|
681
|
+
validate: makeTagArrayValidator("cascadedModifierTags"),
|
|
665
682
|
});
|
|
666
683
|
///////////////////////////
|
|
667
684
|
// Organization Options ///
|
|
@@ -669,7 +686,13 @@ function addTypeDocOptions(options) {
|
|
|
669
686
|
options.addDeclaration({
|
|
670
687
|
name: "categorizeByGroup",
|
|
671
688
|
help: (i18n) => i18n.help_categorizeByGroup(),
|
|
672
|
-
type:
|
|
689
|
+
type: ParameterType.Boolean,
|
|
690
|
+
defaultValue: false,
|
|
691
|
+
});
|
|
692
|
+
options.addDeclaration({
|
|
693
|
+
name: "groupReferencesByType",
|
|
694
|
+
help: (i18n) => i18n.help_groupReferencesByType(),
|
|
695
|
+
type: ParameterType.Boolean,
|
|
673
696
|
defaultValue: false,
|
|
674
697
|
});
|
|
675
698
|
options.addDeclaration({
|
|
@@ -680,44 +703,44 @@ function addTypeDocOptions(options) {
|
|
|
680
703
|
options.addDeclaration({
|
|
681
704
|
name: "categoryOrder",
|
|
682
705
|
help: (i18n) => i18n.help_categoryOrder(),
|
|
683
|
-
type:
|
|
706
|
+
type: ParameterType.Array,
|
|
684
707
|
});
|
|
685
708
|
options.addDeclaration({
|
|
686
709
|
name: "groupOrder",
|
|
687
710
|
help: (i18n) => i18n.help_groupOrder(),
|
|
688
|
-
type:
|
|
711
|
+
type: ParameterType.Array,
|
|
689
712
|
// default order specified in GroupPlugin to correctly handle localization.
|
|
690
713
|
});
|
|
691
714
|
options.addDeclaration({
|
|
692
715
|
name: "sort",
|
|
693
716
|
help: (i18n) => i18n.help_sort(),
|
|
694
|
-
type:
|
|
695
|
-
defaultValue:
|
|
717
|
+
type: ParameterType.Array,
|
|
718
|
+
defaultValue: OptionDefaults.sort,
|
|
696
719
|
validate(value, i18n) {
|
|
697
720
|
const invalid = new Set(value);
|
|
698
|
-
for (const v of
|
|
721
|
+
for (const v of SORT_STRATEGIES) {
|
|
699
722
|
invalid.delete(v);
|
|
700
723
|
}
|
|
701
724
|
if (invalid.size !== 0) {
|
|
702
|
-
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid("sort", Array.from(invalid).join(", "),
|
|
725
|
+
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid("sort", Array.from(invalid).join(", "), SORT_STRATEGIES.join(", ")));
|
|
703
726
|
}
|
|
704
727
|
},
|
|
705
728
|
});
|
|
706
729
|
options.addDeclaration({
|
|
707
730
|
name: "sortEntryPoints",
|
|
708
731
|
help: (i18n) => i18n.help_sortEntryPoints(),
|
|
709
|
-
type:
|
|
732
|
+
type: ParameterType.Boolean,
|
|
710
733
|
defaultValue: true,
|
|
711
734
|
});
|
|
712
735
|
options.addDeclaration({
|
|
713
736
|
name: "kindSortOrder",
|
|
714
737
|
help: (i18n) => i18n.help_kindSortOrder(),
|
|
715
|
-
type:
|
|
738
|
+
type: ParameterType.Array,
|
|
716
739
|
defaultValue: [],
|
|
717
740
|
validate(value, i18n) {
|
|
718
|
-
const invalid =
|
|
741
|
+
const invalid = setDifference(value, getEnumKeys(ReflectionKind));
|
|
719
742
|
if (invalid.size !== 0) {
|
|
720
|
-
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid(`kindSortOrder`, Array.from(invalid).join(", "),
|
|
743
|
+
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid(`kindSortOrder`, Array.from(invalid).join(", "), getEnumKeys(ReflectionKind).join(", ")));
|
|
721
744
|
}
|
|
722
745
|
},
|
|
723
746
|
});
|
|
@@ -727,84 +750,85 @@ function addTypeDocOptions(options) {
|
|
|
727
750
|
options.addDeclaration({
|
|
728
751
|
name: "watch",
|
|
729
752
|
help: (i18n) => i18n.help_watch(),
|
|
730
|
-
type:
|
|
753
|
+
type: ParameterType.Boolean,
|
|
731
754
|
});
|
|
732
755
|
options.addDeclaration({
|
|
733
756
|
name: "preserveWatchOutput",
|
|
734
757
|
help: (i18n) => i18n.help_preserveWatchOutput(),
|
|
735
|
-
type:
|
|
758
|
+
type: ParameterType.Boolean,
|
|
736
759
|
});
|
|
737
760
|
options.addDeclaration({
|
|
738
761
|
name: "skipErrorChecking",
|
|
739
762
|
help: (i18n) => i18n.help_skipErrorChecking(),
|
|
740
|
-
type:
|
|
763
|
+
type: ParameterType.Boolean,
|
|
741
764
|
defaultValue: false,
|
|
742
765
|
});
|
|
743
766
|
options.addDeclaration({
|
|
744
767
|
name: "help",
|
|
745
768
|
help: (i18n) => i18n.help_help(),
|
|
746
|
-
type:
|
|
769
|
+
type: ParameterType.Boolean,
|
|
747
770
|
});
|
|
748
771
|
options.addDeclaration({
|
|
749
772
|
name: "version",
|
|
750
773
|
help: (i18n) => i18n.help_version(),
|
|
751
|
-
type:
|
|
774
|
+
type: ParameterType.Boolean,
|
|
752
775
|
});
|
|
753
776
|
options.addDeclaration({
|
|
754
777
|
name: "showConfig",
|
|
755
778
|
help: (i18n) => i18n.help_showConfig(),
|
|
756
|
-
type:
|
|
779
|
+
type: ParameterType.Boolean,
|
|
757
780
|
});
|
|
758
781
|
options.addDeclaration({
|
|
759
782
|
name: "plugin",
|
|
760
783
|
help: (i18n) => i18n.help_plugin(),
|
|
761
|
-
type:
|
|
784
|
+
type: ParameterType.ModuleArray,
|
|
762
785
|
});
|
|
763
786
|
options.addDeclaration({
|
|
764
787
|
name: "logLevel",
|
|
765
788
|
help: (i18n) => i18n.help_logLevel(),
|
|
766
|
-
type:
|
|
767
|
-
map:
|
|
768
|
-
defaultValue:
|
|
789
|
+
type: ParameterType.Map,
|
|
790
|
+
map: LogLevel,
|
|
791
|
+
defaultValue: LogLevel.Info,
|
|
769
792
|
});
|
|
770
793
|
options.addDeclaration({
|
|
771
794
|
name: "treatWarningsAsErrors",
|
|
772
795
|
help: (i18n) => i18n.help_treatWarningsAsErrors(),
|
|
773
|
-
type:
|
|
796
|
+
type: ParameterType.Boolean,
|
|
774
797
|
});
|
|
775
798
|
options.addDeclaration({
|
|
776
799
|
name: "treatValidationWarningsAsErrors",
|
|
777
800
|
help: (i18n) => i18n.help_treatValidationWarningsAsErrors(),
|
|
778
|
-
type:
|
|
801
|
+
type: ParameterType.Boolean,
|
|
779
802
|
});
|
|
780
803
|
options.addDeclaration({
|
|
781
804
|
name: "intentionallyNotExported",
|
|
782
805
|
help: (i18n) => i18n.help_intentionallyNotExported(),
|
|
783
|
-
type:
|
|
806
|
+
type: ParameterType.Array,
|
|
784
807
|
});
|
|
785
808
|
options.addDeclaration({
|
|
786
809
|
name: "requiredToBeDocumented",
|
|
787
810
|
help: (i18n) => i18n.help_requiredToBeDocumented(),
|
|
788
|
-
type:
|
|
811
|
+
type: ParameterType.Array,
|
|
789
812
|
validate(values, i18n) {
|
|
790
813
|
// this is good enough because the values of the ReflectionKind enum are all numbers
|
|
791
|
-
const validValues =
|
|
814
|
+
const validValues = getEnumKeys(ReflectionKind);
|
|
792
815
|
for (const kind of values) {
|
|
793
816
|
if (!validValues.includes(kind)) {
|
|
794
817
|
throw new Error(i18n.option_0_specified_1_but_only_2_is_valid("requiredToBeDocumented", kind, validValues.join(", ")));
|
|
795
818
|
}
|
|
796
819
|
}
|
|
797
820
|
},
|
|
798
|
-
defaultValue:
|
|
821
|
+
defaultValue: OptionDefaults.requiredToBeDocumented,
|
|
799
822
|
});
|
|
800
823
|
options.addDeclaration({
|
|
801
824
|
name: "validation",
|
|
802
825
|
help: (i18n) => i18n.help_validation(),
|
|
803
|
-
type:
|
|
826
|
+
type: ParameterType.Flags,
|
|
804
827
|
defaults: {
|
|
805
828
|
notExported: true,
|
|
806
829
|
invalidLink: true,
|
|
807
830
|
notDocumented: false,
|
|
831
|
+
unusedMergeModuleWith: true,
|
|
808
832
|
},
|
|
809
833
|
});
|
|
810
834
|
}
|