typedoc 0.26.11 → 0.27.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +212 -239
- package/dist/lib/converter/factories/index-signature.d.ts +3 -3
- package/dist/lib/converter/factories/index-signature.js +43 -26
- 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 +372 -2
- package/dist/lib/internationalization/locales/en.d.cts +343 -2
- package/dist/lib/internationalization/locales/jp.cjs +13 -14
- package/dist/lib/internationalization/locales/jp.d.cts +307 -1
- package/dist/lib/internationalization/locales/ko.cjs +12 -11
- package/dist/lib/internationalization/locales/ko.d.cts +221 -1
- package/dist/lib/internationalization/locales/zh.cjs +43 -19
- package/dist/lib/internationalization/locales/zh.d.cts +409 -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 +29 -16
- 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 +624 -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 +14 -0
- package/dist/lib/output/output.js +91 -0
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +9 -8
- package/dist/lib/output/plugins/AssetsPlugin.js +64 -80
- package/dist/lib/output/plugins/HierarchyPlugin.d.ts +7 -0
- package/dist/lib/output/plugins/HierarchyPlugin.js +67 -0
- 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 +7 -6
- package/dist/lib/output/plugins/index.js +7 -15
- package/dist/lib/output/renderer.d.ts +14 -13
- package/dist/lib/output/renderer.js +130 -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 +48 -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 +4 -4
- package/dist/lib/output/themes/default/partials/hierarchy.js +12 -15
- 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 +222 -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 +24 -22
- 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 +32 -34
- package/dist/lib/output/themes/lib.d.ts +17 -3
- package/dist/lib/output/themes/lib.js +118 -50
- 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 -6
- package/dist/lib/utils/jsx.elements.d.ts +1 -1
- package/dist/lib/utils/jsx.elements.js +3 -4
- package/dist/lib/utils/jsx.js +82 -52
- 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 +35 -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 +232 -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 +17 -14
- package/static/main.js +4 -4
- package/static/style.css +109 -17
- 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,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isNamedNode = isNamedNode;
|
|
7
|
-
exports.getHeritageTypes = getHeritageTypes;
|
|
8
|
-
exports.isObjectType = isObjectType;
|
|
9
|
-
const typescript_1 = __importDefault(require("typescript"));
|
|
10
|
-
function isNamedNode(node) {
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
export function isNamedNode(node) {
|
|
11
3
|
const name = node.name;
|
|
12
|
-
return !!name && (
|
|
4
|
+
return !!name && (ts.isMemberName(name) || ts.isComputedPropertyName(name));
|
|
13
5
|
}
|
|
14
|
-
function getHeritageTypes(declarations, kind) {
|
|
6
|
+
export function getHeritageTypes(declarations, kind) {
|
|
15
7
|
const exprs = declarations.flatMap((d) => (d.heritageClauses ?? [])
|
|
16
8
|
.filter((hc) => hc.token === kind)
|
|
17
9
|
.flatMap((hc) => hc.types));
|
|
@@ -25,6 +17,6 @@ function getHeritageTypes(declarations, kind) {
|
|
|
25
17
|
return true;
|
|
26
18
|
});
|
|
27
19
|
}
|
|
28
|
-
function isObjectType(type) {
|
|
20
|
+
export function isObjectType(type) {
|
|
29
21
|
return typeof type.objectFlags === "number";
|
|
30
22
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type SomeType } from "../../models";
|
|
1
|
+
import { type SomeType } from "../../models/index.js";
|
|
2
2
|
export declare function removeUndefined(type: SomeType): SomeType;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const models_1 = require("../../models");
|
|
5
|
-
function removeUndefined(type) {
|
|
6
|
-
if (type instanceof models_1.UnionType) {
|
|
1
|
+
import { IntrinsicType, UnionType } from "../../models/index.js";
|
|
2
|
+
export function removeUndefined(type) {
|
|
3
|
+
if (type instanceof UnionType) {
|
|
7
4
|
const types = type.types.filter((t) => {
|
|
8
|
-
if (t instanceof
|
|
5
|
+
if (t instanceof IntrinsicType) {
|
|
9
6
|
return t.name !== "undefined";
|
|
10
7
|
}
|
|
11
8
|
return true;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
2
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
3
|
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
@@ -33,29 +32,28 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
33
32
|
}
|
|
34
33
|
return useValue ? value : void 0;
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const utils_1 = require("../../utils");
|
|
42
|
-
const general_1 = require("../../utils/general");
|
|
43
|
-
const path_1 = require("path");
|
|
44
|
-
const fs_1 = require("fs");
|
|
35
|
+
import { spawnSync } from "child_process";
|
|
36
|
+
import { normalizePath } from "../../utils/index.js";
|
|
37
|
+
import { NonEnumerable } from "../../utils/general.js";
|
|
38
|
+
import { dirname, join } from "path";
|
|
39
|
+
import { existsSync } from "fs";
|
|
45
40
|
const TEN_MEGABYTES = 1024 * 10000;
|
|
46
41
|
function git(...args) {
|
|
47
|
-
return
|
|
42
|
+
return spawnSync("git", args, {
|
|
48
43
|
encoding: "utf-8",
|
|
49
44
|
windowsHide: true,
|
|
50
45
|
maxBuffer: TEN_MEGABYTES,
|
|
51
46
|
});
|
|
52
47
|
}
|
|
53
48
|
let haveGit;
|
|
54
|
-
function gitIsInstalled() {
|
|
49
|
+
export function gitIsInstalled() {
|
|
55
50
|
haveGit ??= git("--version").status === 0;
|
|
56
51
|
return haveGit;
|
|
57
52
|
}
|
|
58
|
-
class AssumedRepository {
|
|
53
|
+
export class AssumedRepository {
|
|
54
|
+
path;
|
|
55
|
+
gitRevision;
|
|
56
|
+
sourceLinkTemplate;
|
|
59
57
|
constructor(path, gitRevision, sourceLinkTemplate) {
|
|
60
58
|
this.path = path;
|
|
61
59
|
this.gitRevision = gitRevision;
|
|
@@ -71,97 +69,99 @@ class AssumedRepository {
|
|
|
71
69
|
return this.sourceLinkTemplate.replace(/\{(gitRevision|gitRevision:short|path|line)\}/g, (_, key) => replacements[key]);
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
|
-
exports.AssumedRepository = AssumedRepository;
|
|
75
72
|
/**
|
|
76
73
|
* Stores data of a repository.
|
|
77
74
|
*/
|
|
78
75
|
let GitRepository = (() => {
|
|
79
|
-
var _a;
|
|
80
76
|
let _files_decorators;
|
|
81
77
|
let _files_initializers = [];
|
|
82
78
|
let _files_extraInitializers = [];
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
79
|
+
return class GitRepository {
|
|
80
|
+
static {
|
|
81
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
82
|
+
_files_decorators = [NonEnumerable];
|
|
83
|
+
__esDecorate(null, null, _files_decorators, { kind: "field", name: "files", static: false, private: false, access: { has: obj => "files" in obj, get: obj => obj.files, set: (obj, value) => { obj.files = value; } }, metadata: _metadata }, _files_initializers, _files_extraInitializers);
|
|
84
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The path of this repository on disk.
|
|
88
|
+
*/
|
|
89
|
+
path;
|
|
90
|
+
/**
|
|
91
|
+
* All files tracked by the repository.
|
|
92
|
+
*/
|
|
93
|
+
files = __runInitializers(this, _files_initializers, new Set());
|
|
94
|
+
urlTemplate = __runInitializers(this, _files_extraInitializers);
|
|
95
|
+
gitRevision;
|
|
96
|
+
/**
|
|
97
|
+
* Create a new Repository instance.
|
|
98
|
+
*
|
|
99
|
+
* @param path The root path of the repository.
|
|
100
|
+
*/
|
|
101
|
+
constructor(path, gitRevision, urlTemplate) {
|
|
102
|
+
this.path = path;
|
|
103
|
+
this.gitRevision = gitRevision;
|
|
104
|
+
this.urlTemplate = urlTemplate;
|
|
105
|
+
const out = git("-C", path, "ls-files", "-z");
|
|
106
|
+
if (out.status === 0) {
|
|
107
|
+
out.stdout.split("\0").forEach((file) => {
|
|
108
|
+
if (file !== "") {
|
|
109
|
+
this.files.add(normalizePath(path + "/" + file));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
106
112
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const replacements = {
|
|
118
|
-
gitRevision: this.gitRevision,
|
|
119
|
-
"gitRevision:short": this.gitRevision.substring(0, 8),
|
|
120
|
-
path: fileName.substring(this.path.length + 1),
|
|
121
|
-
line,
|
|
122
|
-
};
|
|
123
|
-
return this.urlTemplate.replace(/\{(gitRevision|gitRevision:short|path|line)\}/g, (_, key) => replacements[key]);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Get the URL of the given file on GitHub or Bitbucket.
|
|
116
|
+
*
|
|
117
|
+
* @param fileName The file whose URL should be determined.
|
|
118
|
+
* @returns A URL pointing to the web preview of the given file or undefined.
|
|
119
|
+
*/
|
|
120
|
+
getURL(fileName, line) {
|
|
121
|
+
if (!this.files.has(fileName)) {
|
|
122
|
+
return;
|
|
124
123
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
124
|
+
const replacements = {
|
|
125
|
+
gitRevision: this.gitRevision,
|
|
126
|
+
"gitRevision:short": this.gitRevision.substring(0, 8),
|
|
127
|
+
path: fileName.substring(this.path.length + 1),
|
|
128
|
+
line,
|
|
129
|
+
};
|
|
130
|
+
return this.urlTemplate.replace(/\{(gitRevision|gitRevision:short|path|line)\}/g, (_, key) => replacements[key]);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Try to create a new repository instance.
|
|
134
|
+
*
|
|
135
|
+
* Checks whether the given path is the root of a valid repository and if so
|
|
136
|
+
* creates a new instance of {@link GitRepository}.
|
|
137
|
+
*
|
|
138
|
+
* @param path The potential repository root.
|
|
139
|
+
* @returns A new instance of {@link GitRepository} or undefined.
|
|
140
|
+
*/
|
|
141
|
+
static tryCreateRepository(path, sourceLinkTemplate, gitRevision, gitRemote, logger) {
|
|
142
|
+
gitRevision ||= git("-C", path, "rev-parse", "HEAD").stdout.trim();
|
|
143
|
+
if (!gitRevision)
|
|
144
|
+
return; // Will only happen in a repo with no commits.
|
|
145
|
+
let urlTemplate;
|
|
146
|
+
if (sourceLinkTemplate) {
|
|
147
|
+
urlTemplate = sourceLinkTemplate;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
const remotesOut = git("-C", path, "remote", "get-url", gitRemote);
|
|
151
|
+
if (remotesOut.status === 0) {
|
|
152
|
+
urlTemplate = guessSourceUrlTemplate(remotesOut.stdout.split("\n"));
|
|
141
153
|
}
|
|
142
154
|
else {
|
|
143
|
-
|
|
144
|
-
if (remotesOut.status === 0) {
|
|
145
|
-
urlTemplate = guessSourceUrlTemplate(remotesOut.stdout.split("\n"));
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
logger.warn(logger.i18n.git_remote_0_not_valid(gitRemote));
|
|
149
|
-
}
|
|
155
|
+
logger.warn(logger.i18n.git_remote_0_not_valid(gitRemote));
|
|
150
156
|
}
|
|
151
|
-
if (!urlTemplate)
|
|
152
|
-
return;
|
|
153
|
-
return new _a((0, utils_1.normalizePath)(path), gitRevision, urlTemplate);
|
|
154
157
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
161
|
-
})(),
|
|
162
|
-
_a;
|
|
158
|
+
if (!urlTemplate)
|
|
159
|
+
return;
|
|
160
|
+
return new GitRepository(normalizePath(path), gitRevision, urlTemplate);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
163
|
})();
|
|
164
|
-
|
|
164
|
+
export { GitRepository };
|
|
165
165
|
/**
|
|
166
166
|
* Responsible for keeping track of 0-N repositories which exist on a machine.
|
|
167
167
|
* This used to be inlined in SourcePlugin, moved out for easy unit testing.
|
|
@@ -187,7 +187,15 @@ exports.GitRepository = GitRepository;
|
|
|
187
187
|
* file. Unlike TypeScript, we will resolve the path, as the repo link should really
|
|
188
188
|
* point to the actual file.
|
|
189
189
|
*/
|
|
190
|
-
class RepositoryManager {
|
|
190
|
+
export class RepositoryManager {
|
|
191
|
+
basePath;
|
|
192
|
+
gitRevision;
|
|
193
|
+
gitRemote;
|
|
194
|
+
sourceLinkTemplate;
|
|
195
|
+
disableGit;
|
|
196
|
+
logger;
|
|
197
|
+
cache = new Map();
|
|
198
|
+
assumedRepo;
|
|
191
199
|
constructor(basePath, gitRevision, gitRemote, sourceLinkTemplate, disableGit, logger) {
|
|
192
200
|
this.basePath = basePath;
|
|
193
201
|
this.gitRevision = gitRevision;
|
|
@@ -195,7 +203,6 @@ class RepositoryManager {
|
|
|
195
203
|
this.sourceLinkTemplate = sourceLinkTemplate;
|
|
196
204
|
this.disableGit = disableGit;
|
|
197
205
|
this.logger = logger;
|
|
198
|
-
this.cache = new Map();
|
|
199
206
|
this.assumedRepo = new AssumedRepository(this.basePath, this.gitRevision, this.sourceLinkTemplate);
|
|
200
207
|
}
|
|
201
208
|
/**
|
|
@@ -208,13 +215,13 @@ class RepositoryManager {
|
|
|
208
215
|
if (this.disableGit) {
|
|
209
216
|
return this.assumedRepo;
|
|
210
217
|
}
|
|
211
|
-
return this.getRepositoryFolder(
|
|
218
|
+
return this.getRepositoryFolder(normalizePath(dirname(fileName)));
|
|
212
219
|
}
|
|
213
220
|
getRepositoryFolder(dir) {
|
|
214
221
|
if (this.cache.has(dir)) {
|
|
215
222
|
return this.cache.get(dir);
|
|
216
223
|
}
|
|
217
|
-
if (
|
|
224
|
+
if (existsSync(join(dir, ".git"))) {
|
|
218
225
|
// This might just be a git repo, or we might be in some self-recursive symlink
|
|
219
226
|
// loop, and the repo is actually somewhere else. Ask Git where the repo actually is.
|
|
220
227
|
const repo = git("-C", dir, "rev-parse", "--show-toplevel");
|
|
@@ -235,12 +242,11 @@ class RepositoryManager {
|
|
|
235
242
|
else {
|
|
236
243
|
// We may be at the root of the file system, in which case there is no repo.
|
|
237
244
|
this.cache.set(dir, undefined);
|
|
238
|
-
this.cache.set(dir, this.getRepositoryFolder(
|
|
245
|
+
this.cache.set(dir, this.getRepositoryFolder(dirname(dir)));
|
|
239
246
|
}
|
|
240
247
|
return this.cache.get(dir);
|
|
241
248
|
}
|
|
242
249
|
}
|
|
243
|
-
exports.RepositoryManager = RepositoryManager;
|
|
244
250
|
// Should have three capturing groups:
|
|
245
251
|
// 1. hostname
|
|
246
252
|
// 2. user
|
|
@@ -253,7 +259,7 @@ const repoExpressions = [
|
|
|
253
259
|
/(bitbucket.org)[:/]([^/]+)\/(.*)/,
|
|
254
260
|
/(gitlab.com)[:/]([^/]+)\/(.*)/,
|
|
255
261
|
];
|
|
256
|
-
function guessSourceUrlTemplate(remotes) {
|
|
262
|
+
export function guessSourceUrlTemplate(remotes) {
|
|
257
263
|
let hostname = "";
|
|
258
264
|
let user = "";
|
|
259
265
|
let project = "";
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.resolveAliasedSymbol = resolveAliasedSymbol;
|
|
7
|
-
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
-
function resolveAliasedSymbol(symbol, checker) {
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
export function resolveAliasedSymbol(symbol, checker) {
|
|
9
3
|
const seen = new Set();
|
|
10
|
-
while (
|
|
4
|
+
while (ts.SymbolFlags.Alias & symbol.flags) {
|
|
11
5
|
symbol = checker.getAliasedSymbol(symbol);
|
|
12
6
|
// #2438, with declaration files, we might have an aliased symbol which eventually points to itself.
|
|
13
7
|
if (seen.has(symbol))
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Internationalization module
|
|
3
|
-
*
|
|
2
|
+
* Internationalization module for localized strings in output.
|
|
3
|
+
* @summary Internationalization module for localized strings in output.
|
|
4
4
|
* @module
|
|
5
|
-
* @document ../../../internal-docs/internationalization.md
|
|
6
5
|
*/
|
|
7
|
-
export { type TranslatableStrings, Internationalization, type TranslatedString, type TranslationProxy, } from "./internationalization";
|
|
6
|
+
export { type TranslatableStrings, Internationalization, type TranslatedString, type TranslationProxy, } from "./internationalization.js";
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Internationalization = void 0;
|
|
4
1
|
/**
|
|
5
|
-
* Internationalization module
|
|
6
|
-
*
|
|
2
|
+
* Internationalization module for localized strings in output.
|
|
3
|
+
* @summary Internationalization module for localized strings in output.
|
|
7
4
|
* @module
|
|
8
|
-
* @document ../../../internal-docs/internationalization.md
|
|
9
5
|
*/
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "Internationalization", { enumerable: true, get: function () { return internationalization_1.Internationalization; } });
|
|
6
|
+
export { Internationalization, } from "./internationalization.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Application } from "../application";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { Application } from "../application.js";
|
|
2
|
+
import { ReflectionKind } from "../models/reflections/kind.js";
|
|
3
|
+
import { ReflectionFlag } from "../models/index.js";
|
|
4
|
+
import { type BuiltinTranslatableStringArgs } from "./translatable.js";
|
|
5
|
+
import translatable from "./locales/en.cjs";
|
|
5
6
|
/**
|
|
6
7
|
* ### What is translatable?
|
|
7
8
|
* TypeDoc includes a lot of literal strings. By convention, messages which are displayed
|