1 | import { Converter } from "./converter/index";
|
2 | import { Renderer } from "./output/renderer";
|
3 | import { Deserializer, Serializer } from "./serialization";
|
4 | import type { ProjectReflection } from "./models/index";
|
5 | import { Logger, type OptionsReader } from "./utils/index";
|
6 | import { type AbstractComponent, ChildableComponent } from "./utils/component";
|
7 | import { Options } from "./utils";
|
8 | import type { TypeDocOptions } from "./utils/options/declaration";
|
9 | import { type DocumentationEntryPoint, EntryPointStrategy } from "./utils/entry-point";
|
10 | import { Internationalization } from "./internationalization/internationalization";
|
11 | import { FileRegistry } from "./models/FileRegistry";
|
12 | export declare function createAppForTesting(): Application;
|
13 | export interface ApplicationEvents {
|
14 | bootstrapEnd: [Application];
|
15 | reviveProject: [ProjectReflection];
|
16 | validateProject: [ProjectReflection];
|
17 | }
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | export declare class Application extends ChildableComponent<Application, AbstractComponent<Application, {}>, ApplicationEvents> {
|
37 | |
38 |
|
39 |
|
40 | converter: Converter;
|
41 | |
42 |
|
43 |
|
44 | renderer: Renderer;
|
45 | |
46 |
|
47 |
|
48 | serializer: Serializer;
|
49 | |
50 |
|
51 |
|
52 | deserializer: Deserializer;
|
53 | |
54 |
|
55 |
|
56 | logger: Logger;
|
57 | |
58 |
|
59 |
|
60 |
|
61 | internationalization: Internationalization;
|
62 | |
63 |
|
64 |
|
65 | i18n: import("./internationalization/internationalization").TranslationProxy;
|
66 | options: Options;
|
67 | files: FileRegistry;
|
68 |
|
69 | accessor lang: string;
|
70 |
|
71 | accessor skipErrorChecking: boolean;
|
72 |
|
73 | accessor entryPointStrategy: EntryPointStrategy;
|
74 |
|
75 | accessor entryPoints: string[];
|
76 | |
77 |
|
78 |
|
79 | static readonly VERSION: string;
|
80 | |
81 |
|
82 |
|
83 |
|
84 | static readonly EVENT_BOOTSTRAP_END: "bootstrapEnd";
|
85 | |
86 |
|
87 |
|
88 |
|
89 | static readonly EVENT_PROJECT_REVIVE: "reviveProject";
|
90 | |
91 |
|
92 |
|
93 |
|
94 | static readonly EVENT_VALIDATE_PROJECT: "validateProject";
|
95 | |
96 |
|
97 |
|
98 | private constructor();
|
99 | /**
|
100 | * Initialize TypeDoc, loading plugins if applicable.
|
101 | */
|
102 | static bootstrapWithPlugins(options?: Partial<TypeDocOptions>, readers?: readonly OptionsReader[]): Promise<Application>;
|
103 | /**
|
104 | * Initialize TypeDoc without loading plugins.
|
105 | *
|
106 | * @example
|
107 | * Initialize the application with pretty-printing output disabled.
|
108 | * ```ts
|
109 | * const app = Application.bootstrap({ pretty: false });
|
110 | * ```
|
111 | *
|
112 | * @param options Options to set during initialization
|
113 | * @param readers Option readers to use to discover options from config files.
|
114 | */
|
115 | static bootstrap(options?: Partial<TypeDocOptions>, readers?: readonly OptionsReader[]): Promise<Application>;
|
116 | private _bootstrap;
|
117 | private setOptions;
|
118 | /**
|
119 | * Return the path to the TypeScript compiler.
|
120 | */
|
121 | getTypeScriptPath(): string;
|
122 | getTypeScriptVersion(): string;
|
123 | /**
|
124 | * Gets the entry points to be documented according to the current `entryPoints` and `entryPointStrategy` options.
|
125 | * May return undefined if entry points fail to be expanded.
|
126 | */
|
127 | getEntryPoints(): DocumentationEntryPoint[] | undefined;
|
128 | /**
|
129 | * Run the converter for the given set of files and return the generated reflections.
|
130 | *
|
131 | * @returns An instance of ProjectReflection on success, undefined otherwise.
|
132 | */
|
133 | convert(): Promise<ProjectReflection | undefined>;
|
134 | convertAndWatch(success: (project: ProjectReflection) => Promise<void>): void;
|
135 | validate(project: ProjectReflection): void;
|
136 | /**
|
137 | * Render HTML for the given project
|
138 | */
|
139 | generateDocs(project: ProjectReflection, out: string): Promise<void>;
|
140 | /**
|
141 | * Write the reflections to a json file.
|
142 | *
|
143 | * @param out The path and file name of the target file.
|
144 | * @returns Whether the JSON file could be written successfully.
|
145 | */
|
146 | generateJson(project: ProjectReflection, out: string): Promise<void>;
|
147 | /**
|
148 | * Print the version number.
|
149 | */
|
150 | toString(): string;
|
151 | private _convertPackages;
|
152 | private _merge;
|
153 | }
|