UNPKG

2.33 kBTypeScriptView Raw
1import ts from "typescript";
2import type { Logger } from "./loggers";
3import type { Options } from "./options";
4/**
5 * Defines how entry points are interpreted.
6 * @enum
7 */
8export declare const EntryPointStrategy: {
9 /**
10 * The default behavior in v0.22+, expects all provided entry points as being part of a single program.
11 * Any directories included in the entry point list will result in `dir/index.([cm][tj]s|[tj]sx?)` being used.
12 */
13 readonly Resolve: "resolve";
14 /**
15 * The default behavior in v0.21 and earlier. Behaves like the resolve behavior, but will recursively
16 * expand directories into an entry point for each file within the directory.
17 */
18 readonly Expand: "expand";
19 /**
20 * Run TypeDoc in each directory passed as an entry point. Once all directories have been converted,
21 * use the merge option to produce final output.
22 */
23 readonly Packages: "packages";
24 /**
25 * Merges multiple previously generated output from TypeDoc's --json output together into a single project.
26 */
27 readonly Merge: "merge";
28};
29export type EntryPointStrategy = (typeof EntryPointStrategy)[keyof typeof EntryPointStrategy];
30export interface DocumentationEntryPoint {
31 displayName: string;
32 readmeFile?: string;
33 program: ts.Program;
34 sourceFile: ts.SourceFile;
35 version?: string;
36}
37export interface DocumentEntryPoint {
38 displayName: string;
39 path: string;
40}
41export declare function getEntryPoints(logger: Logger, options: Options): DocumentationEntryPoint[] | undefined;
42/**
43 * Document entry points are markdown documents that the user has requested we include in the project with
44 * an option rather than a `@document` tag.
45 *
46 * @returns A list of `.md` files to include in the documentation as documents.
47 */
48export declare function getDocumentEntryPoints(logger: Logger, options: Options): DocumentEntryPoint[];
49export declare function getWatchEntryPoints(logger: Logger, options: Options, program: ts.Program): DocumentationEntryPoint[] | undefined;
50export declare function getPackageDirectories(logger: Logger, options: Options, packageGlobPaths: string[]): string[];
51export declare function getExpandedEntryPointsForPaths(logger: Logger, inputFiles: string[], options: Options, programs?: ts.Program[]): DocumentationEntryPoint[];