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