typedoc 0.26.0-beta.4 → 0.26.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.
Files changed (69) hide show
  1. package/dist/index.d.ts +5 -6
  2. package/dist/index.js +1 -2
  3. package/dist/lib/application-events.d.ts +3 -3
  4. package/dist/lib/application.d.ts +9 -4
  5. package/dist/lib/application.js +2 -2
  6. package/dist/lib/converter/comments/parser.js +1 -1
  7. package/dist/lib/converter/components.d.ts +1 -1
  8. package/dist/lib/converter/context.d.ts +0 -10
  9. package/dist/lib/converter/context.js +0 -12
  10. package/dist/lib/converter/converter.d.ts +22 -2
  11. package/dist/lib/converter/converter.js +0 -1
  12. package/dist/lib/converter/factories/index-signature.js +1 -1
  13. package/dist/lib/converter/factories/signature.js +5 -5
  14. package/dist/lib/converter/index.d.ts +1 -1
  15. package/dist/lib/converter/jsdoc.js +1 -1
  16. package/dist/lib/converter/plugins/CategoryPlugin.js +2 -4
  17. package/dist/lib/converter/plugins/CommentPlugin.js +7 -9
  18. package/dist/lib/converter/plugins/GroupPlugin.js +8 -10
  19. package/dist/lib/converter/plugins/ImplementsPlugin.js +4 -4
  20. package/dist/lib/converter/plugins/InheritDocPlugin.js +1 -1
  21. package/dist/lib/converter/plugins/LinkResolverPlugin.js +2 -2
  22. package/dist/lib/converter/plugins/PackagePlugin.js +7 -11
  23. package/dist/lib/converter/plugins/SourcePlugin.js +4 -6
  24. package/dist/lib/converter/plugins/TypePlugin.js +4 -8
  25. package/dist/lib/converter/types.js +6 -6
  26. package/dist/lib/internationalization/locales/jp.cjs +15 -1
  27. package/dist/lib/internationalization/locales/jp.d.cts +15 -1
  28. package/dist/lib/internationalization/locales/zh.cjs +15 -1
  29. package/dist/lib/internationalization/locales/zh.d.cts +15 -1
  30. package/dist/lib/internationalization/translatable.d.ts +5 -1
  31. package/dist/lib/internationalization/translatable.js +7 -1
  32. package/dist/lib/output/components.d.ts +1 -1
  33. package/dist/lib/output/components.js +3 -5
  34. package/dist/lib/output/events.d.ts +6 -13
  35. package/dist/lib/output/events.js +7 -17
  36. package/dist/lib/output/index.d.ts +1 -1
  37. package/dist/lib/output/plugins/AssetsPlugin.d.ts +6 -0
  38. package/dist/lib/output/plugins/AssetsPlugin.js +27 -16
  39. package/dist/lib/output/plugins/IconsPlugin.js +1 -3
  40. package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +0 -8
  41. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +4 -18
  42. package/dist/lib/output/plugins/NavigationPlugin.js +2 -5
  43. package/dist/lib/output/plugins/SitemapPlugin.js +3 -3
  44. package/dist/lib/output/renderer.d.ts +11 -4
  45. package/dist/lib/output/renderer.js +11 -21
  46. package/dist/lib/output/themes/MarkedPlugin.js +5 -5
  47. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +0 -1
  48. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +0 -2
  49. package/dist/lib/output/themes/default/layouts/default.js +0 -1
  50. package/dist/lib/output/themes/default/partials/comment.js +2 -3
  51. package/dist/lib/output/themes/default/partials/navigation.js +1 -1
  52. package/dist/lib/output/themes/default/templates/hierarchy.js +1 -1
  53. package/dist/lib/serialization/events.d.ts +2 -3
  54. package/dist/lib/serialization/events.js +2 -4
  55. package/dist/lib/serialization/index.d.ts +1 -1
  56. package/dist/lib/serialization/serializer.d.ts +10 -5
  57. package/dist/lib/serialization/serializer.js +6 -6
  58. package/dist/lib/utils/component.d.ts +4 -18
  59. package/dist/lib/utils/component.js +1 -39
  60. package/dist/lib/utils/events.d.ts +18 -113
  61. package/dist/lib/utils/events.js +33 -374
  62. package/dist/lib/utils/index.d.ts +1 -1
  63. package/dist/lib/utils/index.js +1 -2
  64. package/dist/lib/utils/options/declaration.d.ts +0 -1
  65. package/dist/lib/utils/options/sources/typedoc.js +1 -4
  66. package/package.json +11 -10
  67. package/static/main.js +2 -3
  68. package/dist/lib/output/themes/default/partials/analytics.d.ts +0 -3
  69. package/dist/lib/output/themes/default/partials/analytics.js +0 -19
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { Application } from "./lib/application";
2
- export { EventDispatcher, Event } from "./lib/utils/events";
1
+ export { Application, type ApplicationEvents } from "./lib/application";
2
+ export { EventDispatcher } from "./lib/utils/events";
3
3
  export { resetReflectionID } from "./lib/models/reflections/abstract";
4
4
  /**
5
5
  * All symbols documented under the Models namespace are also available in the root import.
@@ -17,13 +17,12 @@ export * as Models from "./lib/models";
17
17
  */
18
18
  export * as Configuration from "./lib/utils/options";
19
19
  export * from "./lib/models";
20
- export { Converter, Context, type CommentParserConfig, type DeclarationReference, type SymbolReference, type ComponentPath, type Meaning, type MeaningKeyword, type ExternalResolveResult, type ExternalSymbolResolver, } from "./lib/converter";
20
+ export { Converter, Context, type CommentParserConfig, type DeclarationReference, type SymbolReference, type ComponentPath, type Meaning, type MeaningKeyword, type ExternalResolveResult, type ExternalSymbolResolver, type ConverterEvents, } from "./lib/converter";
21
21
  export { Renderer, DefaultTheme, DefaultThemeRenderContext, Slugger, UrlMapping, Theme, PageEvent, RendererEvent, MarkdownEvent, IndexEvent, } from "./lib/output";
22
- export type { RenderTemplate, RendererHooks, NavigationElement, } from "./lib/output";
22
+ export type { RenderTemplate, RendererHooks, NavigationElement, RendererEvents, } from "./lib/output";
23
23
  export { ArgumentsReader, Option, CommentStyle, JSX, LogLevel, Logger, Options, PackageJsonReader, ParameterHint, ParameterType, TSConfigReader, TypeDocReader, EntryPointStrategy, EventHooks, MinimalSourceFile, normalizePath, } from "./lib/utils";
24
24
  export type { OptionsReader, TypeDocOptions, TypeDocOptionMap, ValidationOptions, TypeDocOptionValues, KeyToDeclaration, DeclarationOption, DeclarationOptionBase, StringDeclarationOption, NumberDeclarationOption, BooleanDeclarationOption, ArrayDeclarationOption, MixedDeclarationOption, ObjectDeclarationOption, MapDeclarationOption, FlagsDeclarationOption, DeclarationOptionToOptionType, SortStrategy, ParameterTypeToOptionTypeMap, DocumentationEntryPoint, ManuallyValidatedOption, EnumKeys, JsDocCompatibility, } from "./lib/utils";
25
- export type { EventMap, EventCallback } from "./lib/utils/events";
26
- export { JSONOutput, Serializer, Deserializer, type Deserializable, type DeserializerComponent, type SerializerComponent, SerializeEvent, } from "./lib/serialization";
25
+ export { JSONOutput, Serializer, type SerializerEvents, Deserializer, type Deserializable, type DeserializerComponent, type SerializerComponent, SerializeEvent, } from "./lib/serialization";
27
26
  export * as Internationalization from "./lib/internationalization/index";
28
27
  import TypeScript from "typescript";
29
28
  export { TypeScript };
package/dist/index.js CHANGED
@@ -29,12 +29,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
29
29
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.TypeScript = exports.Internationalization = exports.SerializeEvent = exports.Deserializer = exports.Serializer = exports.JSONOutput = exports.normalizePath = exports.MinimalSourceFile = exports.EventHooks = exports.EntryPointStrategy = exports.TypeDocReader = exports.TSConfigReader = exports.ParameterType = exports.ParameterHint = exports.PackageJsonReader = exports.Options = exports.Logger = exports.LogLevel = exports.JSX = exports.CommentStyle = exports.Option = exports.ArgumentsReader = exports.IndexEvent = exports.MarkdownEvent = exports.RendererEvent = exports.PageEvent = exports.Theme = exports.UrlMapping = exports.Slugger = exports.DefaultThemeRenderContext = exports.DefaultTheme = exports.Renderer = exports.Context = exports.Converter = exports.Configuration = exports.Models = exports.resetReflectionID = exports.Event = exports.EventDispatcher = exports.Application = void 0;
32
+ exports.TypeScript = exports.Internationalization = exports.SerializeEvent = exports.Deserializer = exports.Serializer = exports.JSONOutput = exports.normalizePath = exports.MinimalSourceFile = exports.EventHooks = exports.EntryPointStrategy = exports.TypeDocReader = exports.TSConfigReader = exports.ParameterType = exports.ParameterHint = exports.PackageJsonReader = exports.Options = exports.Logger = exports.LogLevel = exports.JSX = exports.CommentStyle = exports.Option = exports.ArgumentsReader = exports.IndexEvent = exports.MarkdownEvent = exports.RendererEvent = exports.PageEvent = exports.Theme = exports.UrlMapping = exports.Slugger = exports.DefaultThemeRenderContext = exports.DefaultTheme = exports.Renderer = exports.Context = exports.Converter = exports.Configuration = exports.Models = exports.resetReflectionID = exports.EventDispatcher = exports.Application = void 0;
33
33
  var application_1 = require("./lib/application");
34
34
  Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return application_1.Application; } });
35
35
  var events_1 = require("./lib/utils/events");
36
36
  Object.defineProperty(exports, "EventDispatcher", { enumerable: true, get: function () { return events_1.EventDispatcher; } });
37
- Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } });
38
37
  var abstract_1 = require("./lib/models/reflections/abstract");
39
38
  Object.defineProperty(exports, "resetReflectionID", { enumerable: true, get: function () { return abstract_1.resetReflectionID; } });
40
39
  /**
@@ -1,5 +1,5 @@
1
1
  export declare const ApplicationEvents: {
2
- BOOTSTRAP_END: string;
3
- REVIVE: string;
4
- VALIDATE_PROJECT: string;
2
+ readonly BOOTSTRAP_END: "bootstrapEnd";
3
+ readonly REVIVE: "reviveProject";
4
+ readonly VALIDATE_PROJECT: "validateProject";
5
5
  };
@@ -10,6 +10,11 @@ import { type DocumentationEntryPoint, EntryPointStrategy } from "./utils/entry-
10
10
  import { Internationalization } from "./internationalization/internationalization";
11
11
  import { FileRegistry } from "./models/FileRegistry";
12
12
  export declare function createAppForTesting(): Application;
13
+ export interface ApplicationEvents {
14
+ bootstrapEnd: [Application];
15
+ reviveProject: [ProjectReflection];
16
+ validateProject: [ProjectReflection];
17
+ }
13
18
  /**
14
19
  * The default TypeDoc main application class.
15
20
  *
@@ -28,7 +33,7 @@ export declare function createAppForTesting(): Application;
28
33
  * Access to an Application instance can be retrieved with {@link Application.bootstrap} or
29
34
  * {@link Application.bootstrapWithPlugins}. It can not be constructed manually.
30
35
  */
31
- export declare class Application extends ChildableComponent<Application, AbstractComponent<Application>> {
36
+ export declare class Application extends ChildableComponent<Application, AbstractComponent<Application, {}>, ApplicationEvents> {
32
37
  /**
33
38
  * The converter used to create the declaration reflections.
34
39
  */
@@ -76,17 +81,17 @@ export declare class Application extends ChildableComponent<Application, Abstrac
76
81
  * Emitted after plugins have been loaded and options have been read, but before they have been frozen.
77
82
  * The listener will be given an instance of {@link Application}.
78
83
  */
79
- static readonly EVENT_BOOTSTRAP_END: string;
84
+ static readonly EVENT_BOOTSTRAP_END: "bootstrapEnd";
80
85
  /**
81
86
  * Emitted after a project has been deserialized from JSON.
82
87
  * The listener will be given an instance of {@link ProjectReflection}.
83
88
  */
84
- static readonly EVENT_PROJECT_REVIVE: string;
89
+ static readonly EVENT_PROJECT_REVIVE: "reviveProject";
85
90
  /**
86
91
  * Emitted when validation is being run.
87
92
  * The listener will be given an instance of {@link ProjectReflection}.
88
93
  */
89
- static readonly EVENT_VALIDATE_PROJECT: string;
94
+ static readonly EVENT_VALIDATE_PROJECT: "validateProject";
90
95
  /**
91
96
  * Create a new TypeDoc application instance.
92
97
  */
@@ -204,8 +204,8 @@ let Application = (() => {
204
204
  _Application_entryPointStrategy_accessor_storage.set(this, (__runInitializers(this, _skipErrorChecking_extraInitializers), __runInitializers(this, _entryPointStrategy_initializers, void 0)));
205
205
  _Application_entryPoints_accessor_storage.set(this, (__runInitializers(this, _entryPointStrategy_extraInitializers), __runInitializers(this, _entryPoints_initializers, void 0)));
206
206
  __runInitializers(this, _entryPoints_extraInitializers);
207
- this.converter = this.addComponent("converter", index_1.Converter);
208
- this.renderer = this.addComponent("renderer", renderer_1.Renderer);
207
+ this.converter = new index_1.Converter(this);
208
+ this.renderer = new renderer_1.Renderer(this);
209
209
  this.logger.i18n = this.i18n;
210
210
  }
211
211
  /**
@@ -257,7 +257,7 @@ function defaultBlockContent(comment, lexer, config, i18n, warning, files) {
257
257
  const content = blockContent(comment, lexer, config, i18n, () => { }, tempRegistry);
258
258
  const end = lexer.done() || lexer.peek();
259
259
  lexer.release();
260
- if (content.some((part) => part.kind === "code")) {
260
+ if (content.some((part) => part.kind === "code" || part.kind === "inline-tag")) {
261
261
  return blockContent(comment, lexer, config, i18n, warning, files);
262
262
  }
263
263
  const tokens = [];
@@ -1,5 +1,5 @@
1
1
  import { Component, AbstractComponent } from "../utils/component";
2
2
  import type { Converter } from "./converter";
3
3
  export { Component };
4
- export declare abstract class ConverterComponent extends AbstractComponent<Converter> {
4
+ export declare abstract class ConverterComponent extends AbstractComponent<Converter, {}> {
5
5
  }
@@ -71,16 +71,6 @@ export declare class Context {
71
71
  * @param symbol The symbol the given reflection was resolved from.
72
72
  */
73
73
  registerReflection(reflection: Reflection, symbol: ts.Symbol | undefined): void;
74
- /**
75
- * Trigger a node reflection event.
76
- *
77
- * All events are dispatched on the current converter instance.
78
- *
79
- * @param name The name of the event that should be triggered.
80
- * @param reflection The triggering reflection.
81
- * @param node The triggering TypeScript node if available.
82
- */
83
- trigger(name: string, reflection: Reflection, node?: ts.Node): void;
84
74
  /** @internal */
85
75
  setActiveProgram(program: ts.Program | undefined): void;
86
76
  getComment(symbol: ts.Symbol, kind: ReflectionKind): import("../models/index").Comment | undefined;
@@ -169,18 +169,6 @@ class Context {
169
169
  registerReflection(reflection, symbol) {
170
170
  this.project.registerReflection(reflection, symbol, void 0);
171
171
  }
172
- /**
173
- * Trigger a node reflection event.
174
- *
175
- * All events are dispatched on the current converter instance.
176
- *
177
- * @param name The name of the event that should be triggered.
178
- * @param reflection The triggering reflection.
179
- * @param node The triggering TypeScript node if available.
180
- */
181
- trigger(name, reflection, node) {
182
- this.converter.trigger(name, this, reflection, node);
183
- }
184
172
  /** @internal */
185
173
  setActiveProgram(program) {
186
174
  this._program = program;
@@ -1,6 +1,6 @@
1
1
  import ts from "typescript";
2
2
  import type { Application } from "../application";
3
- import { Comment, type CommentDisplayPart, type ContainerReflection, ProjectReflection, type Reflection, type ReflectionSymbolId, type SomeType } from "../models/index";
3
+ import { Comment, type CommentDisplayPart, type ContainerReflection, type DeclarationReflection, type ParameterReflection, ProjectReflection, type Reflection, type ReflectionSymbolId, type SignatureReflection, type SomeType, type TypeParameterReflection } from "../models/index";
4
4
  import { Context } from "./context";
5
5
  import { ConverterComponent } from "./components";
6
6
  import { ChildableComponent } from "../utils/component";
@@ -11,10 +11,30 @@ import type { CommentStyle, ValidationOptions } from "../utils/options/declarati
11
11
  import { type ExternalSymbolResolver, type ExternalResolveResult } from "./comments/linkResolver";
12
12
  import { type DeclarationReference } from "./comments/declarationReference";
13
13
  import type { FileRegistry } from "../models/FileRegistry";
14
+ export interface ConverterEvents {
15
+ begin: [Context];
16
+ end: [Context];
17
+ createDeclaration: [Context, DeclarationReflection];
18
+ createSignature: [
19
+ Context,
20
+ SignatureReflection,
21
+ (ts.SignatureDeclaration | ts.IndexSignatureDeclaration | ts.JSDocSignature)?,
22
+ ts.Signature?
23
+ ];
24
+ createParameter: [Context, ParameterReflection, ts.Node?];
25
+ createTypeParameter: [
26
+ Context,
27
+ TypeParameterReflection,
28
+ ts.TypeParameterDeclaration?
29
+ ];
30
+ resolveBegin: [Context];
31
+ resolveReflection: [Context, Reflection];
32
+ resolveEnd: [Context];
33
+ }
14
34
  /**
15
35
  * Compiles source files using TypeScript and converts compiler symbols to reflections.
16
36
  */
17
- export declare class Converter extends ChildableComponent<Application, ConverterComponent> {
37
+ export declare class Converter extends ChildableComponent<Application, ConverterComponent, ConverterEvents> {
18
38
  /** @internal */
19
39
  accessor externalPattern: string[];
20
40
  private externalPatternCache?;
@@ -329,7 +329,6 @@ let Converter = (() => {
329
329
  ? context.getComment(symbol, context.project.kind)
330
330
  : context.getFileComment(node);
331
331
  this.processDocumentTags(context.project, context.project);
332
- context.trigger(Converter.EVENT_CREATE_DECLARATION, context.project);
333
332
  moduleContext = context;
334
333
  }
335
334
  else {
@@ -27,6 +27,6 @@ function convertIndexSignatures(context, symbol) {
27
27
  context.registerReflection(index, indexSymbol);
28
28
  context.scope.indexSignatures ||= [];
29
29
  context.scope.indexSignatures.push(index);
30
- context.trigger(converter_events_1.ConverterEvents.CREATE_SIGNATURE, index, indexDeclaration);
30
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_SIGNATURE, context, index, indexDeclaration);
31
31
  }
32
32
  }
@@ -111,7 +111,7 @@ function convertParameters(context, sigRef, parameters, parameterNodes) {
111
111
  }
112
112
  paramRefl.comment ||= context.getComment(param, paramRefl.kind);
113
113
  context.registerReflection(paramRefl, param);
114
- context.trigger(converter_events_1.ConverterEvents.CREATE_PARAMETER, paramRefl);
114
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_PARAMETER, context, paramRefl);
115
115
  let type;
116
116
  if (declaration) {
117
117
  type = context.checker.getTypeOfSymbolAtLocation(param, declaration);
@@ -164,7 +164,7 @@ function convertParameterNodes(context, sigRef, parameters) {
164
164
  paramRefl.comment = context.getJsDocComment(param);
165
165
  }
166
166
  context.registerReflection(paramRefl, context.getSymbolAtLocation(param));
167
- context.trigger(converter_events_1.ConverterEvents.CREATE_PARAMETER, paramRefl);
167
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_PARAMETER, context, paramRefl);
168
168
  paramRefl.type = context.converter.convertType(context.withScope(paramRefl), typescript_1.default.isParameter(param) ? param.type : param.typeExpression?.type);
169
169
  const isOptional = typescript_1.default.isParameter(param)
170
170
  ? !!param.questionToken
@@ -221,7 +221,7 @@ function convertTypeParameters(context, parent, parameters) {
221
221
  paramRefl.flags.setFlag(models_1.ReflectionFlag.Const, true);
222
222
  }
223
223
  context.registerReflection(paramRefl, param.getSymbol());
224
- context.trigger(converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER, paramRefl);
224
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER, context, paramRefl);
225
225
  return paramRefl;
226
226
  });
227
227
  }
@@ -244,7 +244,7 @@ function createTypeParamReflection(param, context) {
244
244
  if (typescript_1.default.isJSDocTemplateTag(param.parent)) {
245
245
  paramRefl.comment = context.getJsDocComment(param.parent);
246
246
  }
247
- context.trigger(converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER, paramRefl, param);
247
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER, context, paramRefl, param);
248
248
  return paramRefl;
249
249
  }
250
250
  function convertTemplateParameterNodes(context, nodes) {
@@ -266,7 +266,7 @@ function convertTemplateParameterNodes(context, nodes) {
266
266
  if (typescript_1.default.isJSDocTemplateTag(param.parent)) {
267
267
  paramRefl.comment = context.getJsDocComment(param.parent);
268
268
  }
269
- context.trigger(converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER, paramRefl, param);
269
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER, context, paramRefl, param);
270
270
  return paramRefl;
271
271
  });
272
272
  });
@@ -1,5 +1,5 @@
1
1
  export { Context } from "./context";
2
- export { Converter } from "./converter";
2
+ export { Converter, type ConverterEvents } from "./converter";
3
3
  export type { CommentParserConfig } from "./comments/index";
4
4
  export { convertDefaultValue, convertExpression } from "./convert-expression";
5
5
  export type { DeclarationReference, SymbolReference, ComponentPath, Meaning, MeaningKeyword, } from "./comments/declarationReference";
@@ -61,7 +61,7 @@ function convertJsDocSignature(context, node) {
61
61
  }
62
62
  const reflection = new models_1.DeclarationReflection("__type", models_1.ReflectionKind.TypeLiteral, context.scope);
63
63
  context.registerReflection(reflection, symbol);
64
- context.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, reflection);
64
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, context, reflection);
65
65
  const signature = new models_1.SignatureReflection("__type", models_1.ReflectionKind.CallSignature, reflection);
66
66
  context.project.registerSymbolId(signature, new ReflectionSymbolId_1.ReflectionSymbolId(symbol, node));
67
67
  context.registerReflection(signature, void 0);
@@ -100,10 +100,8 @@ let CategoryPlugin = (() => {
100
100
  * Create a new CategoryPlugin instance.
101
101
  */
102
102
  initialize() {
103
- this.listenTo(this.owner, {
104
- [converter_1.Converter.EVENT_BEGIN]: this.onBegin,
105
- [converter_1.Converter.EVENT_RESOLVE_END]: this.onEndResolve,
106
- }, undefined, -200);
103
+ this.owner.on(converter_1.Converter.EVENT_BEGIN, this.onBegin.bind(this), -200);
104
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE_END, this.onEndResolve.bind(this), -200);
107
105
  }
108
106
  /**
109
107
  * Triggered when the converter begins converting a project.
@@ -215,15 +215,13 @@ let CommentPlugin = (() => {
215
215
  * Create a new CommentPlugin instance.
216
216
  */
217
217
  initialize() {
218
- this.listenTo(this.owner, {
219
- [converter_1.Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,
220
- [converter_1.Converter.EVENT_CREATE_SIGNATURE]: this.onDeclaration,
221
- [converter_1.Converter.EVENT_CREATE_TYPE_PARAMETER]: this.onCreateTypeParameter,
222
- [converter_1.Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,
223
- [converter_1.Converter.EVENT_RESOLVE]: this.onResolve,
224
- [converter_1.Converter.EVENT_END]: () => {
225
- this._excludeKinds = undefined;
226
- },
218
+ this.owner.on(converter_1.Converter.EVENT_CREATE_DECLARATION, this.onDeclaration.bind(this));
219
+ this.owner.on(converter_1.Converter.EVENT_CREATE_SIGNATURE, this.onDeclaration.bind(this));
220
+ this.owner.on(converter_1.Converter.EVENT_CREATE_TYPE_PARAMETER, this.onCreateTypeParameter.bind(this));
221
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE_BEGIN, this.onBeginResolve.bind(this));
222
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE, this.onResolve.bind(this));
223
+ this.owner.on(converter_1.Converter.EVENT_END, () => {
224
+ this._excludeKinds = undefined;
227
225
  });
228
226
  }
229
227
  /**
@@ -116,16 +116,14 @@ let GroupPlugin = (() => {
116
116
  * Create a new GroupPlugin instance.
117
117
  */
118
118
  initialize() {
119
- this.listenTo(this.owner, {
120
- [converter_1.Converter.EVENT_RESOLVE_BEGIN]: () => {
121
- this.sortFunction = (0, sort_1.getSortFunction)(this.application.options);
122
- GroupPlugin.WEIGHTS = this.groupOrder;
123
- if (GroupPlugin.WEIGHTS.length === 0) {
124
- GroupPlugin.WEIGHTS = defaultGroupOrder.map((kind) => this.application.internationalization.kindPluralString(kind));
125
- }
126
- },
127
- [converter_1.Converter.EVENT_RESOLVE_END]: this.onEndResolve,
128
- }, undefined, -100);
119
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE_BEGIN, () => {
120
+ this.sortFunction = (0, sort_1.getSortFunction)(this.application.options);
121
+ GroupPlugin.WEIGHTS = this.groupOrder;
122
+ if (GroupPlugin.WEIGHTS.length === 0) {
123
+ GroupPlugin.WEIGHTS = defaultGroupOrder.map((kind) => this.application.internationalization.kindPluralString(kind));
124
+ }
125
+ }, -100);
126
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE_END, this.onEndResolve.bind(this), -100);
129
127
  }
130
128
  /**
131
129
  * Triggered when the converter has finished resolving a project.
@@ -70,10 +70,10 @@ let ImplementsPlugin = (() => {
70
70
  * Create a new ImplementsPlugin instance.
71
71
  */
72
72
  initialize() {
73
- this.listenTo(this.owner, converter_1.Converter.EVENT_RESOLVE_END, this.onResolveEnd);
74
- this.listenTo(this.owner, converter_1.Converter.EVENT_CREATE_DECLARATION, this.onDeclaration, -1000);
75
- this.listenTo(this.owner, converter_1.Converter.EVENT_CREATE_SIGNATURE, this.onSignature, 1000);
76
- this.listenTo(this.application, application_events_1.ApplicationEvents.REVIVE, this.resolve);
73
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE_END, this.onResolveEnd.bind(this));
74
+ this.owner.on(converter_1.Converter.EVENT_CREATE_DECLARATION, this.onDeclaration.bind(this), -1000);
75
+ this.owner.on(converter_1.Converter.EVENT_CREATE_SIGNATURE, this.onSignature.bind(this), 1000);
76
+ this.application.on(application_events_1.ApplicationEvents.REVIVE, this.resolve.bind(this));
77
77
  }
78
78
  /**
79
79
  * Mark all members of the given class to be the implementation of the matching interface member.
@@ -95,7 +95,7 @@ let InheritDocPlugin = (() => {
95
95
  */
96
96
  initialize() {
97
97
  this.owner.on(converter_1.Converter.EVENT_RESOLVE_END, (context) => this.processInheritDoc(context.project));
98
- this.application.on(application_events_1.ApplicationEvents.REVIVE, this.processInheritDoc, this);
98
+ this.application.on(application_events_1.ApplicationEvents.REVIVE, this.processInheritDoc.bind(this));
99
99
  }
100
100
  /**
101
101
  * Traverse through reflection descendant to check for `inheritDoc` tag.
@@ -74,8 +74,8 @@ let LinkResolverPlugin = (() => {
74
74
  set validation(value) { __classPrivateFieldSet(this, _LinkResolverPlugin_validation_accessor_storage, value, "f"); }
75
75
  initialize() {
76
76
  super.initialize();
77
- this.owner.on(converter_events_1.ConverterEvents.RESOLVE_END, this.onResolve, this, -300);
78
- this.application.on(application_events_1.ApplicationEvents.REVIVE, this.resolveLinks, this, -300);
77
+ this.owner.on(converter_events_1.ConverterEvents.RESOLVE_END, this.onResolve.bind(this), -300);
78
+ this.application.on(application_events_1.ApplicationEvents.REVIVE, this.resolveLinks.bind(this), -300);
79
79
  }
80
80
  onResolve(context) {
81
81
  this.resolveLinks(context.project);
@@ -126,18 +126,14 @@ let PackagePlugin = (() => {
126
126
  get includeVersion() { return __classPrivateFieldGet(this, _PackagePlugin_includeVersion_accessor_storage, "f"); }
127
127
  set includeVersion(value) { __classPrivateFieldSet(this, _PackagePlugin_includeVersion_accessor_storage, value, "f"); }
128
128
  initialize() {
129
- this.listenTo(this.owner, {
130
- [converter_1.Converter.EVENT_BEGIN]: this.onBegin,
131
- [converter_1.Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,
132
- [converter_1.Converter.EVENT_END]: () => {
133
- delete this.readmeFile;
134
- delete this.readmeContents;
135
- delete this.packageJson;
136
- },
137
- });
138
- this.listenTo(this.application, {
139
- [application_events_1.ApplicationEvents.REVIVE]: this.onRevive,
129
+ this.owner.on(converter_1.Converter.EVENT_BEGIN, this.onBegin.bind(this));
130
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE_BEGIN, this.onBeginResolve.bind(this));
131
+ this.owner.on(converter_1.Converter.EVENT_END, () => {
132
+ delete this.readmeFile;
133
+ delete this.readmeContents;
134
+ delete this.packageJson;
140
135
  });
136
+ this.application.on(application_events_1.ApplicationEvents.REVIVE, this.onRevive.bind(this));
141
137
  }
142
138
  onRevive(project) {
143
139
  this.onBegin();
@@ -120,12 +120,10 @@ let SourcePlugin = (() => {
120
120
  * Create a new SourceHandler instance.
121
121
  */
122
122
  initialize() {
123
- this.listenTo(this.owner, {
124
- [converter_1.Converter.EVENT_END]: this.onEnd,
125
- [converter_1.Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,
126
- [converter_1.Converter.EVENT_CREATE_SIGNATURE]: this.onSignature,
127
- [converter_1.Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,
128
- });
123
+ this.owner.on(converter_1.Converter.EVENT_END, this.onEnd.bind(this));
124
+ this.owner.on(converter_1.Converter.EVENT_CREATE_DECLARATION, this.onDeclaration.bind(this));
125
+ this.owner.on(converter_1.Converter.EVENT_CREATE_SIGNATURE, this.onSignature.bind(this));
126
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE_BEGIN, this.onBeginResolve.bind(this));
129
127
  }
130
128
  onEnd() {
131
129
  // Should probably clear repositories/ignoredPaths here, but these aren't likely to change between runs...
@@ -62,14 +62,10 @@ let TypePlugin = (() => {
62
62
  * Create a new TypeHandler instance.
63
63
  */
64
64
  initialize() {
65
- this.listenTo(this.owner, {
66
- [converter_1.Converter.EVENT_RESOLVE]: this.onResolve,
67
- [converter_1.Converter.EVENT_RESOLVE_END]: this.onResolveEnd,
68
- [converter_1.Converter.EVENT_END]: () => this.reflections.clear(),
69
- });
70
- this.listenTo(this.application, {
71
- [application_events_1.ApplicationEvents.REVIVE]: this.onRevive,
72
- });
65
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE, this.onResolve.bind(this));
66
+ this.owner.on(converter_1.Converter.EVENT_RESOLVE_END, this.onResolveEnd.bind(this));
67
+ this.owner.on(converter_1.Converter.EVENT_END, () => this.reflections.clear());
68
+ this.application.on(application_events_1.ApplicationEvents.REVIVE, this.onRevive.bind(this));
73
69
  }
74
70
  onRevive(project) {
75
71
  for (const id in project.reflections) {
@@ -156,7 +156,7 @@ const constructorConverter = {
156
156
  const rc = context.withScope(reflection);
157
157
  rc.convertingTypeNode = true;
158
158
  context.registerReflection(reflection, symbol);
159
- context.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, reflection);
159
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, context, reflection);
160
160
  const signature = new models_1.SignatureReflection("__type", models_1.ReflectionKind.ConstructorSignature, reflection);
161
161
  // This is unfortunate... but seems the obvious place to put this with the current
162
162
  // architecture. Ideally, this would be a property on a "ConstructorType"... but that
@@ -180,7 +180,7 @@ const constructorConverter = {
180
180
  }
181
181
  const reflection = new models_1.DeclarationReflection("__type", models_1.ReflectionKind.Constructor, context.scope);
182
182
  context.registerReflection(reflection, symbol);
183
- context.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, reflection);
183
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, context, reflection);
184
184
  (0, signature_1.createSignature)(context.withScope(reflection), models_1.ReflectionKind.ConstructorSignature, type.getConstructSignatures()[0], symbol);
185
185
  return new models_1.ReflectionType(reflection);
186
186
  },
@@ -211,7 +211,7 @@ const functionTypeConverter = {
211
211
  const reflection = new models_1.DeclarationReflection("__type", models_1.ReflectionKind.TypeLiteral, context.scope);
212
212
  const rc = context.withScope(reflection);
213
213
  context.registerReflection(reflection, symbol);
214
- context.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, reflection);
214
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, context, reflection);
215
215
  const signature = new models_1.SignatureReflection("__type", models_1.ReflectionKind.CallSignature, reflection);
216
216
  context.project.registerSymbolId(signature, new ReflectionSymbolId_1.ReflectionSymbolId(symbol, node));
217
217
  context.registerReflection(signature, undefined);
@@ -229,7 +229,7 @@ const functionTypeConverter = {
229
229
  }
230
230
  const reflection = new models_1.DeclarationReflection("__type", models_1.ReflectionKind.TypeLiteral, context.scope);
231
231
  context.registerReflection(reflection, symbol);
232
- context.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, reflection);
232
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, context, reflection);
233
233
  (0, signature_1.createSignature)(context.withScope(reflection), models_1.ReflectionKind.CallSignature, type.getCallSignatures()[0], type.getSymbol());
234
234
  return new models_1.ReflectionType(reflection);
235
235
  },
@@ -370,7 +370,7 @@ const typeLiteralConverter = {
370
370
  const rc = context.withScope(reflection);
371
371
  rc.convertingTypeNode = true;
372
372
  context.registerReflection(reflection, symbol);
373
- context.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, reflection);
373
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, context, reflection);
374
374
  for (const prop of context.checker.getPropertiesOfType(type)) {
375
375
  (0, symbols_1.convertSymbol)(rc, prop);
376
376
  }
@@ -387,7 +387,7 @@ const typeLiteralConverter = {
387
387
  const symbol = type.getSymbol();
388
388
  const reflection = new models_1.DeclarationReflection("__type", models_1.ReflectionKind.TypeLiteral, context.scope);
389
389
  context.registerReflection(reflection, symbol);
390
- context.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, reflection);
390
+ context.converter.trigger(converter_events_1.ConverterEvents.CREATE_DECLARATION, context, reflection);
391
391
  for (const prop of context.checker.getPropertiesOfType(type)) {
392
392
  (0, symbols_1.convertSymbol)(context.withScope(reflection), prop);
393
393
  }
@@ -58,6 +58,9 @@ module.exports = (0, translatable_1.buildIncompleteTranslation)({
58
58
  comment_for_0_includes_categoryDescription_for_1_but_no_child_in_group: "{0} のコメントに「{1}」の @categoryDe​​scription が含まれていますが、そのカテゴリに子が配置されていません",
59
59
  comment_for_0_includes_groupDescription_for_1_but_no_child_in_group: '{0} のコメントに "{1}" の @groupDescription が含まれていますが、そのグループには子が配置されていません',
60
60
  label_0_for_1_cannot_be_referenced: '{1} のラベル "{0}" は宣言参照では参照できません。ラベルには A ~ Z、0 ~ 9、_ のみを含めることができ、数字で始まることはできません。',
61
+ failed_to_resolve_link_to_0_in_comment_for_1_may_have_meant_2: `{1} のコメント内の "{0}" へのリンクを解決できません。"{2}" を意味していた可能性があります。`,
62
+ failed_to_resolve_link_to_0_in_readme_for_1: `{1} の README ファイル内の "{0}" へのリンクを解決できません。`,
63
+ failed_to_resolve_link_to_0_in_readme_for_1_may_have_meant_2: `{1} の README ファイル内の "{0}" へのリンクを解決できません。"{2}" を意味していた可能性があります。`,
61
64
  modifier_tag_0_is_mutually_exclusive_with_1_in_comment_for_2: "修飾子タグ {0} は、{2} のコメント内の {1} と相互に排他的です",
62
65
  signature_0_has_unused_param_with_name_1: '署名 {0} には、名前が "{1}" の @param がありますが、使用されていません。',
63
66
  declaration_reference_in_inheritdoc_for_0_not_fully_parsed: "{0} の @inheritDoc の宣言参照が完全に解析されていないため、正しく解決されない可能性があります",
@@ -156,7 +159,6 @@ module.exports = (0, translatable_1.buildIncompleteTranslation)({
156
159
  help_githubPages: "GitHub Pages で 404 エラーを防ぐために .nojekyll ファイルを生成します。デフォルトは `true` です。",
157
160
  help_hostedBaseUrl: "出力フォルダ内の sitemap.xml と正規リンクを生成する際に使用するベース URL を指定します。指定しない場合は、サイトマップは生成されません。",
158
161
  help_useHostedBaseUrlForAbsoluteLinks: "設定されている場合、TypeDocはhostedBaseUrlオプションを使用してサイト上のページへの絶対リンクを生成します。",
159
- help_gaID: "Google AnalyticsのトラッキングIDを設定し、トラッキングコードを有効にする",
160
162
  help_hideGenerator: "ページの最後にある TypeDoc リンクを印刷しないでください",
161
163
  help_customFooterHtml: "TypeDoc リンクの後のカスタム フッター",
162
164
  help_customFooterHtmlDisableWrapper: "設定されている場合、customFooterHtml のラッパー要素が無効になります。",
@@ -275,6 +277,13 @@ module.exports = (0, translatable_1.buildIncompleteTranslation)({
275
277
  flag_private: "非公開",
276
278
  flag_external: "外部",
277
279
  flag_inherited: "継承",
280
+ flag_public: "公開",
281
+ flag_static: "静的",
282
+ flag_optional: "オプション",
283
+ flag_rest: "REST パラメータ",
284
+ flag_abstract: "抽象",
285
+ flag_const: "定数",
286
+ flag_readonly: "読み取り専用",
278
287
  theme_implements: "実装",
279
288
  theme_indexable: "インデックス可能",
280
289
  theme_type_declaration: "型宣言",
@@ -305,4 +314,9 @@ module.exports = (0, translatable_1.buildIncompleteTranslation)({
305
314
  tag_see: "参照",
306
315
  tag_group: "所属グループ",
307
316
  tag_example: "例",
317
+ theme_copy: "コピー",
318
+ theme_copied: "コピー完了!",
319
+ theme_normally_hidden: "このメンバーは、フィルター設定のため、通常は非表示になっています。",
320
+ theme_class_hierarchy_title: "クラス継承図",
321
+ theme_loading: "読み込み中...",
308
322
  });
@@ -56,6 +56,9 @@ declare const _default: {
56
56
  comment_for_0_includes_categoryDescription_for_1_but_no_child_in_group: "{0} のコメントに「{1}」の @categoryDe​​scription が含まれていますが、そのカテゴリに子が配置されていません";
57
57
  comment_for_0_includes_groupDescription_for_1_but_no_child_in_group: "{0} のコメントに \"{1}\" の @groupDescription が含まれていますが、そのグループには子が配置されていません";
58
58
  label_0_for_1_cannot_be_referenced: "{1} のラベル \"{0}\" は宣言参照では参照できません。ラベルには A ~ Z、0 ~ 9、_ のみを含めることができ、数字で始まることはできません。";
59
+ failed_to_resolve_link_to_0_in_comment_for_1_may_have_meant_2: "{1} のコメント内の \"{0}\" へのリンクを解決できません。\"{2}\" を意味していた可能性があります。";
60
+ failed_to_resolve_link_to_0_in_readme_for_1: "{1} の README ファイル内の \"{0}\" へのリンクを解決できません。";
61
+ failed_to_resolve_link_to_0_in_readme_for_1_may_have_meant_2: "{1} の README ファイル内の \"{0}\" へのリンクを解決できません。\"{2}\" を意味していた可能性があります。";
59
62
  modifier_tag_0_is_mutually_exclusive_with_1_in_comment_for_2: "修飾子タグ {0} は、{2} のコメント内の {1} と相互に排他的です";
60
63
  signature_0_has_unused_param_with_name_1: "署名 {0} には、名前が \"{1}\" の @param がありますが、使用されていません。";
61
64
  declaration_reference_in_inheritdoc_for_0_not_fully_parsed: "{0} の @inheritDoc の宣言参照が完全に解析されていないため、正しく解決されない可能性があります";
@@ -154,7 +157,6 @@ declare const _default: {
154
157
  help_githubPages: string;
155
158
  help_hostedBaseUrl: string;
156
159
  help_useHostedBaseUrlForAbsoluteLinks: string;
157
- help_gaID: string;
158
160
  help_hideGenerator: string;
159
161
  help_customFooterHtml: string;
160
162
  help_customFooterHtmlDisableWrapper: string;
@@ -273,6 +275,13 @@ declare const _default: {
273
275
  flag_private: string;
274
276
  flag_external: string;
275
277
  flag_inherited: string;
278
+ flag_public: string;
279
+ flag_static: string;
280
+ flag_optional: string;
281
+ flag_rest: string;
282
+ flag_abstract: string;
283
+ flag_const: string;
284
+ flag_readonly: string;
276
285
  theme_implements: string;
277
286
  theme_indexable: string;
278
287
  theme_type_declaration: string;
@@ -303,5 +312,10 @@ declare const _default: {
303
312
  tag_see: string;
304
313
  tag_group: string;
305
314
  tag_example: string;
315
+ theme_copy: string;
316
+ theme_copied: string;
317
+ theme_normally_hidden: string;
318
+ theme_class_hierarchy_title: string;
319
+ theme_loading: string;
306
320
  };
307
321
  export = _default;