typedoc 0.27.0-beta.0 → 0.27.0-beta.2

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.
Files changed (58) hide show
  1. package/dist/lib/application.d.ts +1 -1
  2. package/dist/lib/application.js +2 -5
  3. package/dist/lib/converter/converter.js +2 -1
  4. package/dist/lib/converter/factories/index-signature.d.ts +2 -2
  5. package/dist/lib/converter/factories/index-signature.js +39 -16
  6. package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +1 -1
  7. package/dist/lib/converter/symbols.js +11 -3
  8. package/dist/lib/converter/types.js +3 -4
  9. package/dist/lib/internationalization/locales/en.cjs +9 -3
  10. package/dist/lib/internationalization/locales/en.d.cts +7 -3
  11. package/dist/lib/internationalization/locales/jp.cjs +5 -3
  12. package/dist/lib/internationalization/locales/jp.d.cts +0 -3
  13. package/dist/lib/internationalization/locales/ko.cjs +5 -2
  14. package/dist/lib/internationalization/locales/ko.d.cts +0 -2
  15. package/dist/lib/internationalization/locales/zh.cjs +40 -13
  16. package/dist/lib/internationalization/locales/zh.d.cts +35 -7
  17. package/dist/lib/models/types.d.ts +3 -3
  18. package/dist/lib/output/formatter.js +6 -1
  19. package/dist/lib/output/output.d.ts +2 -1
  20. package/dist/lib/output/output.js +30 -11
  21. package/dist/lib/output/plugins/AssetsPlugin.d.ts +2 -0
  22. package/dist/lib/output/plugins/AssetsPlugin.js +2 -0
  23. package/dist/lib/output/plugins/HierarchyPlugin.d.ts +7 -0
  24. package/dist/lib/output/plugins/HierarchyPlugin.js +67 -0
  25. package/dist/lib/output/plugins/index.d.ts +1 -0
  26. package/dist/lib/output/plugins/index.js +1 -0
  27. package/dist/lib/output/renderer.js +2 -1
  28. package/dist/lib/output/themes/MarkedPlugin.d.ts +1 -1
  29. package/dist/lib/output/themes/default/DefaultTheme.js +1 -1
  30. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +1 -1
  31. package/dist/lib/output/themes/default/layouts/default.js +3 -2
  32. package/dist/lib/output/themes/default/partials/comment.js +1 -1
  33. package/dist/lib/output/themes/default/partials/hierarchy.d.ts +1 -1
  34. package/dist/lib/output/themes/default/partials/hierarchy.js +9 -9
  35. package/dist/lib/output/themes/default/partials/navigation.js +1 -1
  36. package/dist/lib/output/themes/default/partials/toolbar.js +1 -1
  37. package/dist/lib/output/themes/default/partials/typeDetails.js +1 -0
  38. package/dist/lib/output/themes/default/templates/hierarchy.js +18 -13
  39. package/dist/lib/output/themes/default/templates/reflection.js +1 -0
  40. package/dist/lib/output/themes/lib.js +8 -1
  41. package/dist/lib/utils/entry-point.d.ts +1 -1
  42. package/dist/lib/utils/entry-point.js +4 -25
  43. package/dist/lib/utils/fs.d.ts +10 -0
  44. package/dist/lib/utils/fs.js +134 -20
  45. package/dist/lib/utils/general.d.ts +1 -0
  46. package/dist/lib/utils/general.js +4 -0
  47. package/dist/lib/utils/highlighter.d.ts +2 -3
  48. package/dist/lib/utils/highlighter.js +28 -30
  49. package/dist/lib/utils/jsx.d.ts +1 -2
  50. package/dist/lib/utils/jsx.elements.d.ts +1 -1
  51. package/dist/lib/utils/jsx.elements.js +3 -1
  52. package/dist/lib/utils/jsx.js +37 -40
  53. package/dist/lib/utils/options/declaration.d.ts +3 -1
  54. package/dist/lib/utils/options/defaults.d.ts +1 -1
  55. package/dist/lib/utils/options/sources/typedoc.js +13 -1
  56. package/package.json +9 -10
  57. package/static/main.js +4 -4
  58. package/static/style.css +18 -15
@@ -125,7 +125,7 @@ export declare class Application extends AbstractComponent<Application, Applicat
125
125
  */
126
126
  getTypeScriptPath(): string;
127
127
  getTypeScriptVersion(): string;
128
- getEntryPoints(): Promise<DocumentationEntryPoint[] | undefined>;
128
+ getEntryPoints(): DocumentationEntryPoint[] | undefined;
129
129
  /**
130
130
  * Gets the entry points to be documented according to the current `entryPoints` and `entryPointStrategy` options.
131
131
  * May return undefined if entry points fail to be expanded.
@@ -52,7 +52,6 @@ import { findTsConfigFile } from "./utils/tsconfig.js";
52
52
  import { deriveRootDir, glob, readFile } from "./utils/fs.js";
53
53
  import { addInferredDeclarationMapPaths } from "./models/reflections/ReflectionSymbolId.js";
54
54
  import { Internationalization, } from "./internationalization/internationalization.js";
55
- import { loadShikiMetadata } from "./utils/highlighter.js";
56
55
  import { ValidatingFileRegistry, FileRegistry } from "./models/FileRegistry.js";
57
56
  import { readFileSync } from "fs";
58
57
  import { fileURLToPath } from "url";
@@ -215,7 +214,6 @@ let Application = (() => {
215
214
  * Initialize TypeDoc, loading plugins if applicable.
216
215
  */
217
216
  static async bootstrapWithPlugins(options = {}, readers = DEFAULT_READERS) {
218
- await loadShikiMetadata();
219
217
  const app = new Application(DETECTOR);
220
218
  readers.forEach((r) => app.options.addReader(r));
221
219
  app.options.reset();
@@ -239,7 +237,6 @@ let Application = (() => {
239
237
  * @param readers Option readers to use to discover options from config files.
240
238
  */
241
239
  static async bootstrap(options = {}, readers = DEFAULT_READERS) {
242
- await loadShikiMetadata();
243
240
  const app = new Application(DETECTOR);
244
241
  readers.forEach((r) => app.options.addReader(r));
245
242
  await app._bootstrap(options);
@@ -300,7 +297,7 @@ let Application = (() => {
300
297
  getTypeScriptVersion() {
301
298
  return ts.version;
302
299
  }
303
- async getEntryPoints() {
300
+ getEntryPoints() {
304
301
  if (this.options.isSet("entryPoints")) {
305
302
  return this.getDefinedEntryPoints();
306
303
  }
@@ -333,7 +330,7 @@ let Application = (() => {
333
330
  if (!supportedVersionMajorMinor.some((version) => version == ts.versionMajorMinor)) {
334
331
  this.logger.warn(this.i18n.unsupported_ts_version_0(supportedVersionMajorMinor.join(", ")));
335
332
  }
336
- const entryPoints = await this.getEntryPoints();
333
+ const entryPoints = this.getEntryPoints();
337
334
  if (!entryPoints) {
338
335
  // Fatal error already reported.
339
336
  return;
@@ -605,7 +605,8 @@ function getExports(context, node, symbol) {
605
605
  if (globalSymbol) {
606
606
  result = context.checker
607
607
  .getExportsOfModule(globalSymbol)
608
- .filter((exp) => exp.declarations?.some((d) => d.getSourceFile() === node));
608
+ .filter((exp) => exp.declarations?.some((d) => d.getSourceFile() === node))
609
+ .map((s) => context.checker.getMergedSymbol(s));
609
610
  }
610
611
  }
611
612
  }
@@ -1,3 +1,3 @@
1
- import ts from "typescript";
1
+ import type ts from "typescript";
2
2
  import type { Context } from "../context.js";
3
- export declare function convertIndexSignatures(context: Context, symbol: ts.Symbol): void;
3
+ export declare function convertIndexSignatures(context: Context, type: ts.Type): void;
@@ -1,26 +1,49 @@
1
1
  import assert from "assert";
2
- import ts from "typescript";
3
- import { DeclarationReflection, ParameterReflection, ReflectionKind, SignatureReflection, } from "../../models/index.js";
2
+ import { DeclarationReflection, ParameterReflection, ReflectionFlag, ReflectionKind, SignatureReflection, UnionType, } from "../../models/index.js";
4
3
  import { ConverterEvents } from "../converter-events.js";
5
- export function convertIndexSignatures(context, symbol) {
4
+ export function convertIndexSignatures(context, type) {
6
5
  assert(context.scope instanceof DeclarationReflection);
7
- const indexSymbol = symbol.members?.get("__index");
8
- if (!indexSymbol)
9
- return;
10
- for (const indexDeclaration of indexSymbol.getDeclarations() || []) {
11
- assert(ts.isIndexSignatureDeclaration(indexDeclaration));
12
- const param = indexDeclaration.parameters[0];
13
- assert(param && ts.isParameter(param));
6
+ // Each declaration should have one SignatureReflection
7
+ // If we don't have a declaration, the index signature was inferred by TS
8
+ // and we should make a separate SignatureReflection for each index signature.
9
+ const seenByDeclaration = new Map();
10
+ const createdSignatures = [];
11
+ for (const indexInfo of context.checker.getIndexInfosOfType(type)) {
12
+ // Check if we've already created an index signature for this type
13
+ if (indexInfo.declaration &&
14
+ seenByDeclaration.has(indexInfo.declaration)) {
15
+ const createdSig = seenByDeclaration.get(indexInfo.declaration);
16
+ if (createdSig.parameters[0].type?.type !== "union") {
17
+ createdSig.parameters[0].type = new UnionType([
18
+ createdSig.parameters[0].type,
19
+ ]);
20
+ }
21
+ createdSig.parameters[0].type.types.push(context.converter.convertType(context.withScope(createdSig), indexInfo.keyType));
22
+ // No need to update the return type as it will be the same for all members.
23
+ continue;
24
+ }
25
+ // Otherwise create a new one
14
26
  const index = new SignatureReflection("__index", ReflectionKind.IndexSignature, context.scope);
15
- index.comment = context.getNodeComment(indexDeclaration, false);
27
+ if (indexInfo.isReadonly) {
28
+ index.setFlag(ReflectionFlag.Readonly);
29
+ }
30
+ createdSignatures.push([indexInfo.declaration, index]);
31
+ if (indexInfo.declaration) {
32
+ seenByDeclaration.set(indexInfo.declaration, index);
33
+ index.comment = context.getNodeComment(indexInfo.declaration,
34
+ /* moduleComment */ false);
35
+ }
16
36
  index.parameters = [
17
- new ParameterReflection(param.name.getText(), ReflectionKind.Parameter, index),
37
+ new ParameterReflection(indexInfo.declaration?.parameters[0].name.getText() ?? "key", ReflectionKind.Parameter, index),
18
38
  ];
19
- index.parameters[0].type = context.converter.convertType(context.withScope(index.parameters[0]), param.type);
20
- index.type = context.converter.convertType(context.withScope(index), indexDeclaration.type);
21
- context.registerReflection(index, indexSymbol);
39
+ index.parameters[0].type = context.converter.convertType(context.withScope(index.parameters[0]), indexInfo.keyType);
40
+ index.type = context.converter.convertType(context.withScope(index), indexInfo.type);
41
+ context.registerReflection(index, indexInfo.declaration?.symbol);
22
42
  context.scope.indexSignatures ||= [];
23
43
  context.scope.indexSignatures.push(index);
24
- context.converter.trigger(ConverterEvents.CREATE_SIGNATURE, context, index, indexDeclaration);
44
+ }
45
+ // Now that we've created everything, trigger events for them.
46
+ for (const [declaration, index] of createdSignatures) {
47
+ context.converter.trigger(ConverterEvents.CREATE_SIGNATURE, context, index, declaration);
25
48
  }
26
49
  }
@@ -41,7 +41,7 @@ export class MergeModuleWithPlugin extends ConverterComponent {
41
41
  if (tempRefl === target) {
42
42
  this.application.logger.warn(this.application.i18n.reflection_0_tried_to_merge_into_child_1(refl.getFriendlyFullName(), target.getFriendlyFullName()));
43
43
  }
44
- tempRefl = refl.parent;
44
+ tempRefl = tempRefl.parent;
45
45
  }
46
46
  this.application.logger.verbose(`Merging ${refl.getFullName()} into ${target.getFullName()}`);
47
47
  project.mergeModules(refl, target);
@@ -169,7 +169,15 @@ function convertNamespace(context, symbol, exportSymbol) {
169
169
  reflection = existingReflection;
170
170
  }
171
171
  else {
172
- reflection = context.createDeclarationReflection(ReflectionKind.Namespace, symbol, exportSymbol);
172
+ let kind = ReflectionKind.Namespace;
173
+ let nameOverride;
174
+ // #2778 - always treat declare module "foo" as a module, not a namespace
175
+ const declareModule = symbol.declarations?.find((mod) => ts.isModuleDeclaration(mod) && ts.isStringLiteral(mod.name));
176
+ if (declareModule) {
177
+ kind = ReflectionKind.Module;
178
+ nameOverride = declareModule.name.text;
179
+ }
180
+ reflection = context.createDeclarationReflection(kind, symbol, exportSymbol, nameOverride);
173
181
  context.finalizeDeclarationReflection(reflection);
174
182
  }
175
183
  convertSymbols(context.withScope(reflection), context.checker
@@ -258,7 +266,7 @@ function convertTypeAliasAsInterface(context, symbol, exportSymbol, declaration)
258
266
  // And maybe constructor signatures
259
267
  convertConstructSignatures(rc, symbol);
260
268
  // And finally, index signatures
261
- convertIndexSignatures(rc, symbol);
269
+ convertIndexSignatures(rc, type);
262
270
  }
263
271
  function convertFunctionOrMethod(context, symbol, exportSymbol) {
264
272
  // Can't just check method flag because this might be called for properties as well
@@ -375,7 +383,7 @@ function convertClassOrInterface(context, symbol, exportSymbol) {
375
383
  // but nobody has complained yet.
376
384
  convertConstructSignatures(reflectionContext, symbol);
377
385
  // And finally, index signatures
378
- convertIndexSignatures(reflectionContext, symbol);
386
+ convertIndexSignatures(reflectionContext, instanceType);
379
387
  // Normally this shouldn't matter, unless someone did something with skipLibCheck on.
380
388
  return ts.SymbolFlags.Alias;
381
389
  }
@@ -231,8 +231,7 @@ const importType = {
231
231
  kind: [ts.SyntaxKind.ImportType],
232
232
  convert(context, node) {
233
233
  const name = node.qualifier?.getText() ?? "__module";
234
- const symbol = context.checker.getSymbolAtLocation(node);
235
- assert(symbol, "Missing symbol when converting import type node");
234
+ const symbol = context.expectSymbolAtLocation(node.qualifier || node);
236
235
  return ReferenceType.createSymbolReference(context.resolveAliasedSymbol(symbol), context, name);
237
236
  },
238
237
  convertType(context, type) {
@@ -373,7 +372,7 @@ const typeLiteralConverter = {
373
372
  for (const signature of type.getConstructSignatures()) {
374
373
  createSignature(rc, ReflectionKind.ConstructorSignature, signature, symbol);
375
374
  }
376
- convertIndexSignatures(rc, symbol);
375
+ convertIndexSignatures(rc, type);
377
376
  return new ReflectionType(reflection);
378
377
  },
379
378
  convertType(context, type) {
@@ -391,7 +390,7 @@ const typeLiteralConverter = {
391
390
  createSignature(context.withScope(reflection), ReflectionKind.ConstructorSignature, signature, symbol);
392
391
  }
393
392
  if (symbol) {
394
- convertIndexSignatures(context.withScope(reflection), symbol);
393
+ convertIndexSignatures(context.withScope(reflection), type);
395
394
  }
396
395
  return new ReflectionType(reflection);
397
396
  },
@@ -150,7 +150,8 @@ module.exports = {
150
150
  help_excludeProtected: "Ignore protected variables and methods",
151
151
  help_excludeReferences: "If a symbol is exported multiple times, ignore all but the first export",
152
152
  help_externalSymbolLinkMappings: "Define custom links for symbols not included in the documentation",
153
- help_out: "Specify the location the documentation should be written to",
153
+ help_out: "Specify the location the documentation for the default output should be written to. The default output type may be changed by plugins.",
154
+ help_html: "Specify the location where html documentation should be written to.",
154
155
  help_json: "Specify the location and filename a JSON file describing the project is written to",
155
156
  help_pretty: "Specify whether the output JSON should be formatted with tabs",
156
157
  help_emit: "Specify what TypeDoc should emit, 'docs', 'both', or 'none'",
@@ -196,6 +197,7 @@ module.exports = {
196
197
  help_headings: "Determines which optional headings are rendered",
197
198
  help_sluggerConfiguration: "Determines how anchors within rendered HTML are determined.",
198
199
  help_navigation: "Determines how the navigation sidebar is organized",
200
+ help_includeHierarchySummary: "If set, a reflections hierarchy summary will be rendered to a summary page. Defaults to `true`",
199
201
  help_visibilityFilters: "Specify the default visibility for builtin filters and additional filters according to modifier tags",
200
202
  help_searchCategoryBoosts: "Configure search to give a relevance boost to selected categories",
201
203
  help_searchGroupBoosts: 'Configure search to give a relevance boost to selected kinds (eg "class")',
@@ -334,7 +336,8 @@ module.exports = {
334
336
  theme_type_declaration: "Type declaration",
335
337
  theme_index: "Index",
336
338
  theme_hierarchy: "Hierarchy",
337
- theme_hierarchy_view_full: "view full",
339
+ theme_hierarchy_summary: "Hierarchy Summary",
340
+ theme_hierarchy_view_summary: "View Summary",
338
341
  theme_implemented_by: "Implemented by",
339
342
  theme_defined_in: "Defined in",
340
343
  theme_implementation_of: "Implementation of",
@@ -342,7 +345,6 @@ module.exports = {
342
345
  theme_overrides: "Overrides",
343
346
  theme_returns: "Returns",
344
347
  theme_generated_using_typedoc: "Generated using TypeDoc", // If this includes "TypeDoc", theme will insert a link at that location.
345
- theme_class_hierarchy_title: "Class Hierarchy",
346
348
  // Search
347
349
  theme_preparing_search_index: "Preparing search index...",
348
350
  theme_search_index_not_available: "The search index is not available",
@@ -361,7 +363,11 @@ module.exports = {
361
363
  theme_menu: "Menu",
362
364
  theme_permalink: "Permalink",
363
365
  // Used by the frontend JS
366
+ // For the English translations only, these should also be added to
367
+ // src/lib/output/themes/default/assets/typedoc/Application.ts
364
368
  theme_copy: "Copy",
365
369
  theme_copied: "Copied!",
366
370
  theme_normally_hidden: "This member is normally hidden due to your filter settings.",
371
+ theme_hierarchy_expand: "Expand",
372
+ theme_hierarchy_collapse: "Collapse",
367
373
  };
@@ -137,7 +137,8 @@ declare const _default: {
137
137
  readonly help_excludeProtected: "Ignore protected variables and methods";
138
138
  readonly help_excludeReferences: "If a symbol is exported multiple times, ignore all but the first export";
139
139
  readonly help_externalSymbolLinkMappings: "Define custom links for symbols not included in the documentation";
140
- readonly help_out: "Specify the location the documentation should be written to";
140
+ readonly help_out: "Specify the location the documentation for the default output should be written to. The default output type may be changed by plugins.";
141
+ readonly help_html: "Specify the location where html documentation should be written to.";
141
142
  readonly help_json: "Specify the location and filename a JSON file describing the project is written to";
142
143
  readonly help_pretty: "Specify whether the output JSON should be formatted with tabs";
143
144
  readonly help_emit: "Specify what TypeDoc should emit, 'docs', 'both', or 'none'";
@@ -183,6 +184,7 @@ declare const _default: {
183
184
  readonly help_headings: "Determines which optional headings are rendered";
184
185
  readonly help_sluggerConfiguration: "Determines how anchors within rendered HTML are determined.";
185
186
  readonly help_navigation: "Determines how the navigation sidebar is organized";
187
+ readonly help_includeHierarchySummary: "If set, a reflections hierarchy summary will be rendered to a summary page. Defaults to `true`";
186
188
  readonly help_visibilityFilters: "Specify the default visibility for builtin filters and additional filters according to modifier tags";
187
189
  readonly help_searchCategoryBoosts: "Configure search to give a relevance boost to selected categories";
188
190
  readonly help_searchGroupBoosts: "Configure search to give a relevance boost to selected kinds (eg \"class\")";
@@ -310,7 +312,8 @@ declare const _default: {
310
312
  readonly theme_type_declaration: "Type declaration";
311
313
  readonly theme_index: "Index";
312
314
  readonly theme_hierarchy: "Hierarchy";
313
- readonly theme_hierarchy_view_full: "view full";
315
+ readonly theme_hierarchy_summary: "Hierarchy Summary";
316
+ readonly theme_hierarchy_view_summary: "View Summary";
314
317
  readonly theme_implemented_by: "Implemented by";
315
318
  readonly theme_defined_in: "Defined in";
316
319
  readonly theme_implementation_of: "Implementation of";
@@ -318,7 +321,6 @@ declare const _default: {
318
321
  readonly theme_overrides: "Overrides";
319
322
  readonly theme_returns: "Returns";
320
323
  readonly theme_generated_using_typedoc: "Generated using TypeDoc";
321
- readonly theme_class_hierarchy_title: "Class Hierarchy";
322
324
  readonly theme_preparing_search_index: "Preparing search index...";
323
325
  readonly theme_search_index_not_available: "The search index is not available";
324
326
  readonly theme_loading: "Loading...";
@@ -335,5 +337,7 @@ declare const _default: {
335
337
  readonly theme_copy: "Copy";
336
338
  readonly theme_copied: "Copied!";
337
339
  readonly theme_normally_hidden: "This member is normally hidden due to your filter settings.";
340
+ readonly theme_hierarchy_expand: "Expand";
341
+ readonly theme_hierarchy_collapse: "Collapse";
338
342
  };
339
343
  export = _default;
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ // Please DO NOT include machine generated translations here.
3
+ // If adding a new key, leave it commented out for a native speaker
4
+ // to update.
2
5
  const localeUtils = require("../locale-utils.cjs");
3
6
  module.exports = localeUtils.buildIncompleteTranslation({
4
7
  loaded_multiple_times_0: "TypeDoc が複数回読み込まれました。これは通常、TypeDoc を独自にインストールしたプラグインによって発生します。読み込まれたパスは次のとおりです:\n{0}",
@@ -130,7 +133,8 @@ module.exports = localeUtils.buildIncompleteTranslation({
130
133
  help_excludeProtected: "保護された変数とメソッドを無視する",
131
134
  help_excludeReferences: "シンボルが複数回エクスポートされた場合、最初のエクスポート以外はすべて無視されます。",
132
135
  help_externalSymbolLinkMappings: "ドキュメントに含まれていないシンボルのカスタムリンクを定義する",
133
- help_out: "ドキュメントを書き込む場所を指定します",
136
+ // help_out
137
+ // help_html
134
138
  help_json: "プロジェクトを説明するJSONファイルが書き込まれる場所とファイル名を指定します",
135
139
  help_pretty: "出力JSONをタブでフォーマットするかどうかを指定します",
136
140
  help_emit: "TypeDoc が発行する内容を指定します (「docs」、「both」、または「none」)",
@@ -288,7 +292,6 @@ module.exports = localeUtils.buildIncompleteTranslation({
288
292
  theme_type_declaration: "型宣言",
289
293
  theme_index: "インデックス",
290
294
  theme_hierarchy: "階層",
291
- theme_hierarchy_view_full: "完全な階層を表示",
292
295
  theme_implemented_by: "実装者",
293
296
  theme_defined_in: "定義",
294
297
  theme_implementation_of: "の実装",
@@ -314,6 +317,5 @@ module.exports = localeUtils.buildIncompleteTranslation({
314
317
  theme_copy: "コピー",
315
318
  theme_copied: "コピー完了!",
316
319
  theme_normally_hidden: "このメンバーは、フィルター設定のため、通常は非表示になっています。",
317
- theme_class_hierarchy_title: "クラス継承図",
318
320
  theme_loading: "読み込み中...",
319
321
  });
@@ -123,7 +123,6 @@ declare const _default: {
123
123
  help_excludeProtected: string;
124
124
  help_excludeReferences: string;
125
125
  help_externalSymbolLinkMappings: string;
126
- help_out: string;
127
126
  help_json: string;
128
127
  help_pretty: string;
129
128
  help_emit: string;
@@ -279,7 +278,6 @@ declare const _default: {
279
278
  theme_type_declaration: string;
280
279
  theme_index: string;
281
280
  theme_hierarchy: string;
282
- theme_hierarchy_view_full: string;
283
281
  theme_implemented_by: string;
284
282
  theme_defined_in: string;
285
283
  theme_implementation_of: string;
@@ -305,7 +303,6 @@ declare const _default: {
305
303
  theme_copy: string;
306
304
  theme_copied: string;
307
305
  theme_normally_hidden: string;
308
- theme_class_hierarchy_title: string;
309
306
  theme_loading: string;
310
307
  };
311
308
  export = _default;
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ // Please DO NOT include machine generated translations here.
3
+ // If adding a new key, leave it commented out for a native speaker
4
+ // to update.
2
5
  const localeUtils = require("../locale-utils.cjs");
3
6
  module.exports = localeUtils.buildIncompleteTranslation({
4
7
  // output_0_could_not_be_generated
@@ -48,7 +51,8 @@ module.exports = localeUtils.buildIncompleteTranslation({
48
51
  help_excludeProtected: "보호된 변수와 메서드를 무시합니다",
49
52
  help_excludeReferences: "심볼이 여러 번 내보내진 경우 첫 번째 내보내기를 제외하고 모두 무시합니다",
50
53
  help_externalSymbolLinkMappings: "문서에 포함되지 않은 심볼에 대한 사용자 정의 링크를 정의합니다",
51
- help_out: "문서가 쓰여질 위치를 지정합니다",
54
+ // help_out
55
+ // help_html
52
56
  help_json: "프로젝트를 설명하는 JSON 파일의 위치와 파일 이름을 지정합니다",
53
57
  help_pretty: "출력 JSON을 탭으로 포맷팅할 지 여부를 지정합니다",
54
58
  help_emit: "TypeDoc이 생성할 내용을 지정합니다. 'docs', 'both', 'none' 중 하나를 선택합니다",
@@ -208,7 +212,6 @@ module.exports = localeUtils.buildIncompleteTranslation({
208
212
  theme_type_declaration: "타입 선언",
209
213
  theme_index: "둘러보기",
210
214
  theme_hierarchy: "계층",
211
- theme_hierarchy_view_full: "전체 보기",
212
215
  theme_implemented_by: "구현",
213
216
  theme_defined_in: "정의 위치:",
214
217
  theme_implementation_of: "구현하는 타입:",
@@ -43,7 +43,6 @@ declare const _default: {
43
43
  help_excludeProtected: string;
44
44
  help_excludeReferences: string;
45
45
  help_externalSymbolLinkMappings: string;
46
- help_out: string;
47
46
  help_json: string;
48
47
  help_pretty: string;
49
48
  help_emit: string;
@@ -200,7 +199,6 @@ declare const _default: {
200
199
  theme_type_declaration: string;
201
200
  theme_index: string;
202
201
  theme_hierarchy: string;
203
- theme_hierarchy_view_full: string;
204
202
  theme_implemented_by: string;
205
203
  theme_defined_in: string;
206
204
  theme_implementation_of: string;
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ // Please DO NOT include machine generated translations here.
3
+ // If adding a new key, leave it commented out for a native speaker
4
+ // to update.
2
5
  const localeUtils = require("../locale-utils.cjs");
3
6
  module.exports = localeUtils.buildIncompleteTranslation({
4
7
  loaded_multiple_times_0: "TypeDoc 已加载多次。这通常是由具有自己的 TypeDoc 安装的插件引起的。加载的路径为:\n{0}",
@@ -8,8 +11,8 @@ module.exports = localeUtils.buildIncompleteTranslation({
8
11
  solution_not_supported_in_watch_mode: "提供的 tsconfig 文件看起来像解决方案样式的 tsconfig,在监视模式下不受支持",
9
12
  strategy_not_supported_in_watch_mode: "对于监视模式,entryPointStrategy 必须设置为 resolve 或 expand",
10
13
  found_0_errors_and_1_warnings: "发现 {0} 个错误和 {1} 个警告",
11
- // output_0_could_not_be_generated
12
- // output_0_generated_at_1
14
+ output_0_could_not_be_generated: "由于以上错误无法生成 {0} 输出",
15
+ output_0_generated_at_1: "已生成 {0} 输出,位于 {1}",
13
16
  no_entry_points_for_packages: "没有为包模式提供入口点,无法生成文档",
14
17
  failed_to_find_packages: "找不到任何软件包,请确保您至少提供了一个包含 package.json 的目录作为入口点",
15
18
  nested_packages_unsupported_0: "位于 {0} 的项目已将 entryPointStrategy 设置为包,但不支持嵌套包",
@@ -57,6 +60,7 @@ module.exports = localeUtils.buildIncompleteTranslation({
57
60
  type_0_defined_in_1_is_referenced_by_2_but_not_included_in_docs: "{0} 在 {1} 中定义,被 {2} 引用,但未包含在文档中",
58
61
  reflection_0_kind_1_defined_in_2_does_not_have_any_documentation: "{0} ({1}),在 {2} 中定义,没有任何文档",
59
62
  invalid_intentionally_not_exported_symbols_0: "以下符号被标记为有意不导出,但未在文档中引用,或已被导出:\n{0}",
63
+ reflection_0_has_unused_mergeModuleWith_tag: "{0} 中存在无法解析的 @mergeModuleWith 标签",
60
64
  not_all_search_category_boosts_used_0: "文档中并未使用 searchCategoryBoosts 中指定的所有类别。未使用的类别包括:\n{0}",
61
65
  not_all_search_group_boosts_used_0: "文档中并未使用 searchGroupBoosts 中指定的所有组。未使用的组为:\n{0}",
62
66
  comment_for_0_includes_categoryDescription_for_1_but_no_child_in_group: "{0} 的评论包含“{1}”的 @categoryDescription,但该类别中没有子项",
@@ -73,6 +77,9 @@ module.exports = localeUtils.buildIncompleteTranslation({
73
77
  disable_git_set_but_not_source_link_template: "已设置 disableGit,但未设置 sourceLinkTemplate,因此无法生成源代码链接。设置 sourceLinkTemplate 或 disableSources 以停用源代码跟踪",
74
78
  disable_git_set_and_git_revision_used: "disableGit 已设置,并且 sourceLinkTemplate 包含 {gitRevision},由于未提供修订,因此将替换为空字符串",
75
79
  git_remote_0_not_valid: "提供的 git 远程“{0}”无效。源链接将失效",
80
+ reflection_0_tried_to_merge_into_child_1: "反射 {0} 尝试使用 @mergeModuleWith 合并到其子项之一:{1}",
81
+ include_0_in_1_specified_2_resolved_to_3_does_not_exist: "{1} 的注释中 {0} 标签指定了包含 “{2}”,解析为 “{3}”,该文件并不存在或并非文件。",
82
+ include_0_in_1_specified_2_circular_include_3: "{1} 的注释中 {0} 标签指定了包含 “{2}”,导致了循环包含:\n\t{3}",
76
83
  custom_css_file_0_does_not_exist: "{0} 处的自定义 CSS 文件不存在",
77
84
  custom_js_file_0_does_not_exist: "{0} 处的自定义 JavaScript 文件不存在",
78
85
  unsupported_highlight_language_0_not_highlighted_in_comment_for_1: "不支持的高亮语言 {0} 将不会在 {1} 的注释中高亮",
@@ -82,11 +89,13 @@ module.exports = localeUtils.buildIncompleteTranslation({
82
89
  could_not_empty_output_directory_0: "无法清空输出目录 {0}",
83
90
  could_not_create_output_directory_0: "无法创建输出目录 {0}",
84
91
  theme_0_is_not_defined_available_are_1: "主题“{0}”未定义。可用主题为:{1}",
92
+ reflection_0_links_to_1_but_anchor_does_not_exist_try_2: "{0} 链接至 {1},但对应锚点不存在。你是否是指:\n\t{2}",
85
93
  no_entry_points_provided: "没有提供入口点,这可能是配置错误",
86
94
  unable_to_find_any_entry_points: "无法找到任何入口点。请参阅先前的警告",
87
95
  watch_does_not_support_packages_mode: "监视模式不支持“包”样式的入口点",
88
96
  watch_does_not_support_merge_mode: "监视模式不支持“合并”样式的入口点",
89
97
  entry_point_0_not_in_program: "入口点 {0} 未被 tsconfig 中的“files”或“include”选项引用",
98
+ failed_to_resolve_0_to_ts_path: "无法将 package.json 中的入口点 {0} 解析至 TypeScript 源文件",
90
99
  use_expand_or_glob_for_files_in_dir: "如果要包含此目录中的文件,请设置 --entryPointStrategy 以展开或指定 glob",
91
100
  glob_0_did_not_match_any_files: "glob {0} 与任何文件均不匹配",
92
101
  entry_point_0_did_not_match_any_files_after_exclude: "应用排除模式后,glob {0} 没有匹配任何文件",
@@ -133,7 +142,8 @@ module.exports = localeUtils.buildIncompleteTranslation({
133
142
  help_excludeProtected: "忽略受保护的变量和方法",
134
143
  help_excludeReferences: "如果一个符号被导出多次,则忽略除第一次导出之外的所有导出",
135
144
  help_externalSymbolLinkMappings: "为文档中未包含的符号定义自定义链接",
136
- help_out: "指定文档应写入的位置",
145
+ help_out: "指定默认类型输出的文档写入的位置。插件可能会改变默认的输出类型。",
146
+ help_html: "指定 HTML 文档写入的位置",
137
147
  help_json: "指定描述项目的 JSON 文件写入的位置和文件名",
138
148
  help_pretty: "指定输出 JSON 是否应使用制表符进行格式化",
139
149
  help_emit: "指定 TypeDoc 应发出的内容,“docs”、“both”或“none”",
@@ -141,6 +151,7 @@ module.exports = localeUtils.buildIncompleteTranslation({
141
151
  help_lightHighlightTheme: "指定浅色模式下的代码高亮主题",
142
152
  help_darkHighlightTheme: "指定暗黑模式下的代码高亮主题",
143
153
  help_highlightLanguages: "指定渲染时将加载哪些语言来高亮代码",
154
+ help_typePrintWidth: "渲染类型时触发自动换行的代码宽度",
144
155
  help_customCss: "要导入主题的自定义 CSS 文件的路径",
145
156
  help_customJs: "要导入的自定义 JS 文件的路径",
146
157
  help_markdownItOptions: "指定传递给 markdown-it(TypeDoc 使用的 Markdown 解析器)的选项",
@@ -155,9 +166,10 @@ module.exports = localeUtils.buildIncompleteTranslation({
155
166
  help_disableGit: "假设所有内容都可以通过 sourceLinkTemplate 进行链接,如果启用此功能,则必须设置 sourceLinkTemplate。{path} 将以 basePath 为根",
156
167
  help_basePath: "指定显示文件路径时使用的基本路径",
157
168
  help_excludeTags: "从文档注释中删除列出的块级/修饰符标签",
158
- // help_notRenderedTags
169
+ help_notRenderedTags: "保留在文档注释中但在创建输出时不渲染的标签",
159
170
  help_readme: "应显示在索引页上的自述文件路径。传递“none”以禁用索引页并在全局页上启动文档",
160
171
  help_cname: "设置 CNAME 文件文本,这对于 GitHub Pages 上的自定义域很有用",
172
+ help_favicon: "作为站点图标包含的 favicon.ico 或 favicon.svg 的路径",
161
173
  help_sourceLinkExternal: "指定哪些源代码链接应被视为外部链接,并在新选项卡中打开",
162
174
  help_markdownLinkExternal: "指定注释与 Markdown 文件中哪些 http[s]:// 链接应被视为外部链接,并在新选项卡中打开",
163
175
  help_githubPages: "生成 .nojekyll 文件以防止 GitHub Pages 中出现 404 错误。默认为“true”",
@@ -166,7 +178,6 @@ module.exports = localeUtils.buildIncompleteTranslation({
166
178
  help_hideGenerator: "不要打印页面末尾的 TypeDoc 链接",
167
179
  help_customFooterHtml: "TypeDoc 链接后的自定义页脚",
168
180
  help_customFooterHtmlDisableWrapper: "如果设置,则禁用 customFooterHtml 的包装元素",
169
- // help_hideTypesInSignatureTitle
170
181
  help_cacheBust: "在静态资产链接中包含生成时间",
171
182
  help_searchInComments: "如果设置,搜索索引还将包括注释。这将大大增加搜索索引的大小",
172
183
  help_searchInDocuments: "如果设置,搜索索引还将包含文档。这将大大增加搜索索引的大小",
@@ -175,11 +186,13 @@ module.exports = localeUtils.buildIncompleteTranslation({
175
186
  help_navigationLinks: "定义要包含在标题中的链接",
176
187
  help_sidebarLinks: "定义要包含在侧边栏中的链接",
177
188
  help_navigationLeaves: "导航树中不应扩展的分支",
178
- help_navigation: "确定导航侧边栏的组织方式",
179
189
  help_headings: "确定标题是否需要被渲染",
190
+ help_sluggerConfiguration: "确定渲染的 HTML 中锚点的确定方式",
191
+ help_navigation: "确定导航侧边栏的组织方式",
180
192
  help_visibilityFilters: "根据修饰符标签指定内置过滤器和附加过滤器的默认可见性",
181
193
  help_searchCategoryBoosts: "配置搜索以提高所选类别的相关性",
182
194
  help_searchGroupBoosts: "配置搜索以增强所选种类(例如“类别”)的相关性",
195
+ help_useFirstParagraphOfCommentAsSummary: "如果设置,且没有指定 @summary 标签,TypeDoc 会使用注释的第一行作为在模块/命名空间一览里的概述",
183
196
  help_jsDocCompatibility: "设置注释解析的兼容性选项,以增加与 JSDoc 注释的相似度",
184
197
  help_commentStyle: "确定 TypeDoc 如何搜索注释",
185
198
  help_useTsLinkResolution: "使用 TypeScript 的链接解析来确定 @link 标签指向的位置。这仅适用于 JSDoc 样式注释",
@@ -188,6 +201,7 @@ module.exports = localeUtils.buildIncompleteTranslation({
188
201
  help_inlineTags: "TypeDoc 在解析注释时应该识别的内联标签",
189
202
  help_modifierTags: "TypeDoc 在解析注释时应该识别的修饰符标签",
190
203
  help_categorizeByGroup: "指定是否在组级别进行分类",
204
+ help_groupReferencesByType: "如果设置,引用将按照它们的类型进行分类,而非直接分在“引用”类型中",
191
205
  help_defaultCategory: "为没有类别的反射指定默认类别",
192
206
  help_categoryOrder: "指定类别出现的顺序。* 表示不在列表中的类别的相对顺序",
193
207
  help_groupOrder: "指定组的显示顺序。* 表示不在列表中的组的相对顺序",
@@ -222,6 +236,7 @@ module.exports = localeUtils.buildIncompleteTranslation({
222
236
  highlightLanguages_contains_invalid_languages_0: "highlightLanguages 包含无效语言:{0},运行 typedoc --help 获取受支持语言的列表",
223
237
  hostedBaseUrl_must_start_with_http: "hostingBaseUrl 必须以 http:// 或 https:// 开头",
224
238
  useHostedBaseUrlForAbsoluteLinks_requires_hostedBaseUrl: "useHostedBaseUrlForAbsoluteLinks 选项要求设置 hostingBaseUrl",
239
+ favicon_must_be_ico_or_svg: "Favicon 文件必须是一个 .ico 或 .svg 文件",
225
240
  option_0_must_be_an_object: "“{0}”选项必须是非数组对象",
226
241
  option_0_must_be_a_function: "‘{0}’ 选项必须是一个函数",
227
242
  option_0_must_be_object_with_urls: "{0} 必须是具有字符串标签作为键和 URL 值的对象",
@@ -230,6 +245,13 @@ module.exports = localeUtils.buildIncompleteTranslation({
230
245
  option_0_values_must_be_numbers: "{0} 的所有值都必须是数字",
231
246
  option_0_values_must_be_array_of_tags: "{0} 必须是有效标签名称的数组",
232
247
  option_0_specified_1_but_only_2_is_valid: "{0} 只能指定已知值,并且提供了无效值 ({1})。有效的排序策略为:\n{2}",
248
+ option_outputs_must_be_array: "“outputs” 选项必须为一个数组,其成员均为 { name: string, path: string, options?: TypeDocOptions }。",
249
+ specified_output_0_has_not_been_defined: "指定的输出类型 {0} 未被定义。",
250
+ alert_note: "注意",
251
+ alert_tip: "提示",
252
+ alert_important: "重要",
253
+ alert_warning: "警告",
254
+ alert_caution: "小心",
233
255
  kind_project: "项目",
234
256
  kind_module: "模块",
235
257
  kind_namespace: "命名空间",
@@ -245,7 +267,7 @@ module.exports = localeUtils.buildIncompleteTranslation({
245
267
  kind_call_signature: "调用签名",
246
268
  kind_index_signature: "索引签名",
247
269
  kind_constructor_signature: "构造函数签名",
248
- kind_parameter: "范围",
270
+ kind_parameter: "参数",
249
271
  kind_type_literal: "类型字面量",
250
272
  kind_type_parameter: "类型参数",
251
273
  kind_accessor: "访问器",
@@ -278,23 +300,22 @@ module.exports = localeUtils.buildIncompleteTranslation({
278
300
  kind_plural_type_alias: "类型别名",
279
301
  kind_plural_reference: "参考",
280
302
  kind_plural_document: "文档",
281
- flag_protected: "受保护",
282
303
  flag_private: "私有",
283
- flag_external: "外部",
284
- flag_inherited: "继承",
304
+ flag_protected: "受保护",
285
305
  flag_public: "公开",
286
306
  flag_static: "静态",
307
+ flag_external: "外部",
287
308
  flag_optional: "可选",
288
309
  flag_rest: "动态参数",
289
310
  flag_abstract: "抽象",
290
311
  flag_const: "常量",
291
312
  flag_readonly: "只读",
313
+ flag_inherited: "继承",
292
314
  theme_implements: "实现",
293
315
  theme_indexable: "可索引",
294
316
  theme_type_declaration: "类型声明",
295
317
  theme_index: "索引",
296
318
  theme_hierarchy: "层级",
297
- theme_hierarchy_view_full: "查看完整内容",
298
319
  theme_implemented_by: "实现于",
299
320
  theme_defined_in: "定义于",
300
321
  theme_implementation_of: "实现了",
@@ -304,6 +325,7 @@ module.exports = localeUtils.buildIncompleteTranslation({
304
325
  theme_generated_using_typedoc: "使用 TypeDoc 生成",
305
326
  theme_preparing_search_index: "正在准备搜索索引...",
306
327
  theme_search_index_not_available: "搜索索引不可用",
328
+ theme_loading: "加载中……",
307
329
  theme_settings: "显示设置",
308
330
  theme_member_visibility: "成员可见性",
309
331
  theme_theme: "配色",
@@ -317,8 +339,6 @@ module.exports = localeUtils.buildIncompleteTranslation({
317
339
  theme_copy: "复制",
318
340
  theme_copied: "已复制!",
319
341
  theme_normally_hidden: "由于您的过滤器设置,该成员已被隐藏。",
320
- theme_class_hierarchy_title: "类继承图表",
321
- theme_loading: "加载中……",
322
342
  tag_defaultValue: "默认值",
323
343
  tag_deprecated: "已被弃用",
324
344
  tag_example: "示例",
@@ -345,6 +365,7 @@ module.exports = localeUtils.buildIncompleteTranslation({
345
365
  tag_jsx: "JSX",
346
366
  tag_license: "许可协议",
347
367
  tag_module: "模块",
368
+ tag_mergeModuleWith: "合并模块至",
348
369
  tag_prop: "属性",
349
370
  tag_property: "属性",
350
371
  tag_return: "返回",
@@ -353,10 +374,13 @@ module.exports = localeUtils.buildIncompleteTranslation({
353
374
  tag_template: "类型参数",
354
375
  tag_type: "类型",
355
376
  tag_typedef: "类型定义",
377
+ tag_summary: "概述",
356
378
  tag_link: "链接",
357
379
  tag_label: "标记",
358
380
  tag_linkcode: "链接",
359
381
  tag_linkplain: "链接",
382
+ tag_include: "包含",
383
+ tag_includeCode: "包含",
360
384
  tag_alpha: "alpha",
361
385
  tag_beta: "beta",
362
386
  tag_eventProperty: "事件属性",
@@ -372,11 +396,13 @@ module.exports = localeUtils.buildIncompleteTranslation({
372
396
  tag_class: "类",
373
397
  tag_enum: "枚举",
374
398
  tag_event: "事件",
399
+ tag_expand: "展开",
375
400
  tag_hidden: "隐藏",
376
401
  tag_hideCategories: "在类别中隐藏",
377
402
  tag_hideconstructor: "隐藏构造器",
378
403
  tag_hideGroups: "在分组中隐藏",
379
404
  tag_ignore: "隐藏",
405
+ tag_inline: "内联",
380
406
  tag_interface: "接口",
381
407
  tag_namespace: "命名空间",
382
408
  tag_overload: "重载",
@@ -384,4 +410,5 @@ module.exports = localeUtils.buildIncompleteTranslation({
384
410
  tag_protected: "受保护成员",
385
411
  tag_showCategories: "在类别中显示",
386
412
  tag_showGroups: "在分组中显示",
413
+ tag_useDeclaredType: "使用声明类型",
387
414
  });