typedoc 0.28.2 → 0.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-locales/de.d.ts +2 -0
- package/dist/browser-locales/de.js +62 -0
- package/dist/lib/cli.js +1 -1
- package/dist/lib/converter/context.js +2 -2
- package/dist/lib/converter/converter.d.ts +2 -2
- package/dist/lib/converter/converter.js +12 -5
- package/dist/lib/converter/plugins/ImplementsPlugin.js +12 -0
- package/dist/lib/converter/plugins/IncludePlugin.js +2 -0
- package/dist/lib/converter/symbols.js +2 -1
- package/dist/lib/converter/types.js +15 -0
- package/dist/lib/internationalization/locales/de.cjs +402 -0
- package/dist/lib/internationalization/locales/de.d.cts +369 -0
- package/dist/lib/internationalization/locales/en.cjs +1 -1
- package/dist/lib/internationalization/locales/en.d.cts +1 -1
- package/dist/lib/internationalization/locales/ja.cjs +0 -1
- package/dist/lib/internationalization/locales/zh.cjs +0 -1
- package/dist/lib/internationalization/locales/zh.d.cts +0 -1
- package/dist/lib/models/types.js +255 -207
- package/dist/lib/output/themes/MarkedPlugin.js +5 -0
- package/dist/lib/output/themes/default/partials/icon.d.ts +1 -0
- package/dist/lib/output/themes/default/partials/index.js +1 -1
- package/dist/lib/output/themes/lib.js +8 -11
- package/dist/lib/utils/entry-point.js +0 -3
- package/dist/lib/utils/highlighter.js +3 -2
- package/dist/lib/utils/options/declaration.js +11 -1
- package/dist/lib/utils/options/readers/arguments.d.ts +2 -0
- package/dist/lib/utils/options/readers/arguments.js +17 -4
- package/dist/lib/utils-common/array.d.ts +1 -0
- package/dist/lib/utils-common/array.js +1 -0
- package/dist/lib/utils-common/events.d.ts +1 -0
- package/dist/lib/utils-common/events.js +1 -0
- package/package.json +1 -1
- package/static/main.js +4 -4
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"serialized_project_referenced_0_not_part_of_project": "Serialisiertes Projekt referenziert Reflection {0}, welche kein Teil des Projekts ist",
|
|
3
|
+
"kind_project": "Projekt",
|
|
4
|
+
"kind_module": "Modul",
|
|
5
|
+
"kind_namespace": "Namensraum",
|
|
6
|
+
"kind_enum": "Aufzählung",
|
|
7
|
+
"kind_enum_member": "Aufzählungselement",
|
|
8
|
+
"kind_variable": "Variable",
|
|
9
|
+
"kind_function": "Funktion",
|
|
10
|
+
"kind_class": "Klasse",
|
|
11
|
+
"kind_interface": "Schnittstelle",
|
|
12
|
+
"kind_constructor": "Konstruktor",
|
|
13
|
+
"kind_property": "Eigenschaft",
|
|
14
|
+
"kind_method": "Methode",
|
|
15
|
+
"kind_call_signature": "Aufrufsignatur",
|
|
16
|
+
"kind_index_signature": "Indexsignatur",
|
|
17
|
+
"kind_constructor_signature": "Konstruktorsignatur",
|
|
18
|
+
"kind_parameter": "Parameter",
|
|
19
|
+
"kind_type_literal": "Typenliteral",
|
|
20
|
+
"kind_type_parameter": "Typenparameter",
|
|
21
|
+
"kind_accessor": "Zugriffsfunktion",
|
|
22
|
+
"kind_get_signature": "Abfragesignatur",
|
|
23
|
+
"kind_set_signature": "Änderungssignatur",
|
|
24
|
+
"kind_type_alias": "Typenalias",
|
|
25
|
+
"kind_reference": "Referenz",
|
|
26
|
+
"kind_document": "Dokument",
|
|
27
|
+
"kind_plural_project": "Projekte",
|
|
28
|
+
"kind_plural_module": "Module",
|
|
29
|
+
"kind_plural_namespace": "Namensräume",
|
|
30
|
+
"kind_plural_enum": "Aufzählungen",
|
|
31
|
+
"kind_plural_enum_member": "Aufzählungselemente",
|
|
32
|
+
"kind_plural_variable": "Variablen",
|
|
33
|
+
"kind_plural_function": "Funktionen",
|
|
34
|
+
"kind_plural_class": "Klassen",
|
|
35
|
+
"kind_plural_interface": "Schnittstellen",
|
|
36
|
+
"kind_plural_constructor": "Konstruktoren",
|
|
37
|
+
"kind_plural_property": "Eigenschaften",
|
|
38
|
+
"kind_plural_method": "Methoden",
|
|
39
|
+
"kind_plural_call_signature": "Aufrufsignaturen",
|
|
40
|
+
"kind_plural_index_signature": "Indexsignaturen",
|
|
41
|
+
"kind_plural_constructor_signature": "Konstruktorsignaturen",
|
|
42
|
+
"kind_plural_parameter": "Parameter",
|
|
43
|
+
"kind_plural_type_literal": "Typenliterale",
|
|
44
|
+
"kind_plural_type_parameter": "Typenparameter",
|
|
45
|
+
"kind_plural_accessor": "Zugriffsfunktionen",
|
|
46
|
+
"kind_plural_get_signature": "Abfragesignaturen",
|
|
47
|
+
"kind_plural_set_signature": "Änderungssignaturen",
|
|
48
|
+
"kind_plural_type_alias": "Typenaliasse",
|
|
49
|
+
"kind_plural_reference": "Referenzen",
|
|
50
|
+
"kind_plural_document": "Dokumente",
|
|
51
|
+
"flag_private": "Privat",
|
|
52
|
+
"flag_protected": "Geschützt",
|
|
53
|
+
"flag_public": "Öffentlich",
|
|
54
|
+
"flag_static": "Statisch",
|
|
55
|
+
"flag_external": "Extern",
|
|
56
|
+
"flag_optional": "Optional",
|
|
57
|
+
"flag_rest": "Rest",
|
|
58
|
+
"flag_abstract": "Abstrakt",
|
|
59
|
+
"flag_const": "Konstant",
|
|
60
|
+
"flag_readonly": "Schreibgeschützt",
|
|
61
|
+
"flag_inherited": "Geerbt"
|
|
62
|
+
}
|
package/dist/lib/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ async function main() {
|
|
|
20
20
|
new td.TypeDocReader(),
|
|
21
21
|
new td.PackageJsonReader(),
|
|
22
22
|
new td.TSConfigReader(),
|
|
23
|
-
new td.ArgumentsReader(300),
|
|
23
|
+
new td.ArgumentsReader(300).ignoreErrors(),
|
|
24
24
|
]);
|
|
25
25
|
const exitCode = await run(app);
|
|
26
26
|
if (exitCode !== ExitCodes.Watching) {
|
|
@@ -145,7 +145,7 @@ export class Context {
|
|
|
145
145
|
reflection.escapedName = symbol?.escapedName ? String(symbol.escapedName) : undefined;
|
|
146
146
|
this.addChild(reflection);
|
|
147
147
|
}
|
|
148
|
-
if (symbol && this.converter.isExternal(symbol)) {
|
|
148
|
+
if (symbol && this.converter.isExternal(symbol, this.checker)) {
|
|
149
149
|
reflection.setFlag(ReflectionFlag.External);
|
|
150
150
|
}
|
|
151
151
|
if (exportSymbol) {
|
|
@@ -188,7 +188,7 @@ export class Context {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
shouldIgnore(symbol) {
|
|
191
|
-
return this.converter.shouldIgnore(symbol);
|
|
191
|
+
return this.converter.shouldIgnore(symbol, this.checker);
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
194
|
* Register a newly generated reflection. All created reflections should be
|
|
@@ -226,10 +226,10 @@ export declare class Converter extends AbstractComponent<Application, ConverterE
|
|
|
226
226
|
* information at this point since comment discovery hasn't happened.
|
|
227
227
|
* @internal
|
|
228
228
|
*/
|
|
229
|
-
shouldIgnore(symbol: ts.Symbol): boolean;
|
|
229
|
+
shouldIgnore(symbol: ts.Symbol, checker: ts.TypeChecker): boolean;
|
|
230
230
|
private isExcluded;
|
|
231
231
|
/** @internal */
|
|
232
|
-
isExternal(symbol: ts.Symbol): boolean;
|
|
232
|
+
isExternal(symbol: ts.Symbol, checker: ts.TypeChecker): boolean;
|
|
233
233
|
processDocumentTags(reflection: Reflection, parent: ContainerReflection): void;
|
|
234
234
|
private addDocument;
|
|
235
235
|
private _buildCommentParserConfig;
|
|
@@ -59,6 +59,7 @@ import { SourcePlugin } from "./plugins/SourcePlugin.js";
|
|
|
59
59
|
import { TypePlugin } from "./plugins/TypePlugin.js";
|
|
60
60
|
import { IncludePlugin } from "./plugins/IncludePlugin.js";
|
|
61
61
|
import { MergeModuleWithPlugin } from "./plugins/MergeModuleWithPlugin.js";
|
|
62
|
+
import { resolveAliasedSymbol } from "./utils/symbols.js";
|
|
62
63
|
/**
|
|
63
64
|
* Compiles source files using TypeScript and converts compiler symbols to reflections.
|
|
64
65
|
*
|
|
@@ -310,7 +311,12 @@ let Converter = (() => {
|
|
|
310
311
|
this.compile(entryPoints, context);
|
|
311
312
|
this.resolve(context);
|
|
312
313
|
this.trigger(Converter.EVENT_END, context);
|
|
313
|
-
|
|
314
|
+
// Delete caches of options so that test usage which changes options
|
|
315
|
+
// doesn't have confusing behavior where tests run in isolation work
|
|
316
|
+
// but break when run as a batch.
|
|
317
|
+
delete this._config;
|
|
318
|
+
delete this.excludeCache;
|
|
319
|
+
delete this.externalPatternCache;
|
|
314
320
|
return project;
|
|
315
321
|
}
|
|
316
322
|
/** @internal */
|
|
@@ -487,11 +493,12 @@ let Converter = (() => {
|
|
|
487
493
|
* information at this point since comment discovery hasn't happened.
|
|
488
494
|
* @internal
|
|
489
495
|
*/
|
|
490
|
-
shouldIgnore(symbol) {
|
|
496
|
+
shouldIgnore(symbol, checker) {
|
|
497
|
+
symbol = resolveAliasedSymbol(symbol, checker);
|
|
491
498
|
if (this.isExcluded(symbol)) {
|
|
492
499
|
return true;
|
|
493
500
|
}
|
|
494
|
-
return this.excludeExternals && this.isExternal(symbol);
|
|
501
|
+
return this.excludeExternals && this.isExternal(symbol, checker);
|
|
495
502
|
}
|
|
496
503
|
isExcluded(symbol) {
|
|
497
504
|
this.excludeCache ??= new MinimatchSet(this.application.options.getValue("exclude"));
|
|
@@ -499,10 +506,10 @@ let Converter = (() => {
|
|
|
499
506
|
return (symbol.getDeclarations() ?? []).some((node) => cache.matchesAny(node.getSourceFile().fileName));
|
|
500
507
|
}
|
|
501
508
|
/** @internal */
|
|
502
|
-
isExternal(symbol) {
|
|
509
|
+
isExternal(symbol, checker) {
|
|
503
510
|
this.externalPatternCache ??= new MinimatchSet(this.externalPattern);
|
|
504
511
|
const cache = this.externalPatternCache;
|
|
505
|
-
const declarations = symbol.getDeclarations();
|
|
512
|
+
const declarations = resolveAliasedSymbol(symbol, checker).getDeclarations();
|
|
506
513
|
// `undefined` has no declarations, if someone does `export default undefined`
|
|
507
514
|
// the symbol ends up as having no declarations (the export symbol does, but
|
|
508
515
|
// not the source symbol)
|
|
@@ -133,6 +133,18 @@ export class ImplementsPlugin extends ConverterComponent {
|
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
+
// Remove hidden classes/interfaces which we inherit from
|
|
137
|
+
if (reflection.kindOf(ReflectionKind.ClassOrInterface)) {
|
|
138
|
+
const notHiddenType = (t) => !(t instanceof ReferenceType) ||
|
|
139
|
+
!t.symbolId ||
|
|
140
|
+
!project.symbolIdHasBeenRemoved(t.symbolId);
|
|
141
|
+
reflection.implementedTypes = reflection.implementedTypes?.filter(notHiddenType);
|
|
142
|
+
if (!reflection.implementedTypes?.length)
|
|
143
|
+
delete reflection.implementedTypes;
|
|
144
|
+
reflection.extendedTypes = reflection.extendedTypes?.filter(notHiddenType);
|
|
145
|
+
if (!reflection.extendedTypes?.length)
|
|
146
|
+
delete reflection.extendedTypes;
|
|
147
|
+
}
|
|
136
148
|
if (reflection.kindOf(ReflectionKind.ClassOrInterface) &&
|
|
137
149
|
reflection.extendedTypes) {
|
|
138
150
|
this.analyzeInheritance(project, reflection);
|
|
@@ -246,3 +246,5 @@ regionTagREsByExt["php"] = regionTagREsByExt["cs"];
|
|
|
246
246
|
regionTagREsByExt["ps1"] = regionTagREsByExt["cs"];
|
|
247
247
|
regionTagREsByExt["py"] = regionTagREsByExt["cs"];
|
|
248
248
|
regionTagREsByExt["js"] = regionTagREsByExt["ts"];
|
|
249
|
+
regionTagREsByExt["mts"] = regionTagREsByExt["ts"];
|
|
250
|
+
regionTagREsByExt["cts"] = regionTagREsByExt["ts"];
|
|
@@ -8,6 +8,7 @@ import { convertTypeParameters, createConstructSignatureWithType, createSignatur
|
|
|
8
8
|
import { convertJsDocAlias, convertJsDocCallback } from "./jsdoc.js";
|
|
9
9
|
import { getHeritageTypes } from "./utils/nodes.js";
|
|
10
10
|
import { removeUndefined } from "./utils/reflections.js";
|
|
11
|
+
import { resolveAliasedSymbol } from "./utils/symbols.js";
|
|
11
12
|
const symbolConverters = {
|
|
12
13
|
[ts.SymbolFlags.RegularEnum]: convertEnum,
|
|
13
14
|
[ts.SymbolFlags.ConstEnum]: convertEnum,
|
|
@@ -61,7 +62,7 @@ for (const key of Object.keys(symbolConverters)) {
|
|
|
61
62
|
}
|
|
62
63
|
assert(conversionOrder.reduce((a, b) => a | b, 0) === allConverterFlags, "conversionOrder contains a symbol flag that converters do not.");
|
|
63
64
|
function _convertSymbolNow(context, symbol, exportSymbol) {
|
|
64
|
-
if (context.shouldIgnore(symbol)) {
|
|
65
|
+
if (context.shouldIgnore(resolveAliasedSymbol(symbol, context.checker))) {
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
68
|
// This check can catch symbols which ought to be documented as references
|
|
@@ -45,6 +45,7 @@ export function loadConverters() {
|
|
|
45
45
|
// Only used if skipLibCheck: true
|
|
46
46
|
jsDocNullableTypeConverter,
|
|
47
47
|
jsDocNonNullableTypeConverter,
|
|
48
|
+
jsDocAllTypeConverter,
|
|
48
49
|
]) {
|
|
49
50
|
for (const key of actor.kind) {
|
|
50
51
|
if (key === undefined) {
|
|
@@ -718,6 +719,14 @@ const jsDocNonNullableTypeConverter = {
|
|
|
718
719
|
// Should be a UnionType
|
|
719
720
|
convertType: requestBugReport,
|
|
720
721
|
};
|
|
722
|
+
const jsDocAllTypeConverter = {
|
|
723
|
+
kind: [ts.SyntaxKind.JSDocAllType],
|
|
724
|
+
convert() {
|
|
725
|
+
return new IntrinsicType("any");
|
|
726
|
+
},
|
|
727
|
+
// Should be a UnionType
|
|
728
|
+
convertType: requestBugReport,
|
|
729
|
+
};
|
|
721
730
|
function requestBugReport(context, nodeOrType) {
|
|
722
731
|
if ("kind" in nodeOrType) {
|
|
723
732
|
const kindName = ts.SyntaxKind[nodeOrType.kind];
|
|
@@ -795,5 +804,11 @@ function convertTypeInlined(context, type) {
|
|
|
795
804
|
const elementType = convertType(context, context.checker.getTypeArguments(type)[0]);
|
|
796
805
|
return new ArrayType(elementType);
|
|
797
806
|
}
|
|
807
|
+
if (isTypeReference(type) && context.checker.isTupleType(type)) {
|
|
808
|
+
const tupleNode = context.checker.typeToTypeNode(type.target, void 0, ts.NodeBuilderFlags.IgnoreErrors);
|
|
809
|
+
if (ts.isTupleTypeNode(tupleNode)) {
|
|
810
|
+
return tupleConverter.convertType(context, type, tupleNode);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
798
813
|
return typeLiteralConverter.convertType(context, type);
|
|
799
814
|
}
|