UNPKG

2.39 kBTypeScriptView Raw
1import ts from "typescript";
2import type { Logger } from "./loggers.js";
3import type { Options } from "./options/index.js";
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 program: ts.Program;
33 sourceFile: ts.SourceFile;
34}
35export interface DocumentEntryPoint {
36 displayName: string;
37 path: string;
38}
39export declare function inferEntryPoints(logger: Logger, options: Options): DocumentationEntryPoint[];
40export declare function getEntryPoints(logger: Logger, options: Options): DocumentationEntryPoint[] | undefined;
41/**
42 * Document entry points are markdown documents that the user has requested we include in the project with
43 * an option rather than a `@document` tag.
44 *
45 * @returns A list of `.md` files to include in the documentation as documents.
46 */
47export declare function getDocumentEntryPoints(logger: Logger, options: Options): DocumentEntryPoint[];
48export declare function getWatchEntryPoints(logger: Logger, options: Options, program: ts.Program): DocumentationEntryPoint[] | undefined;
49export declare function getPackageDirectories(logger: Logger, options: Options, packageGlobPaths: string[]): string[];
50export declare function getExpandedEntryPointsForPaths(logger: Logger, inputFiles: string[], options: Options, programs?: ts.Program[]): DocumentationEntryPoint[];