UNPKG

1.23 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.dev/license
7 */
8import ts from 'typescript';
9import { MetadataReader } from '../../metadata';
10import { DocEntry } from './entities';
11/**
12 * Extracts all information from a source file that may be relevant for generating
13 * public API documentation.
14 */
15export declare class DocsExtractor {
16 private typeChecker;
17 private metadataReader;
18 constructor(typeChecker: ts.TypeChecker, metadataReader: MetadataReader);
19 /**
20 * Gets the set of all documentable entries from a source file, including
21 * declarations that are re-exported from this file as an entry-point.
22 *
23 * @param sourceFile The file from which to extract documentable entries.
24 */
25 extractAll(sourceFile: ts.SourceFile, rootDir: string, privateModules: Set<string>): {
26 entries: DocEntry[];
27 symbols: Map<string, string>;
28 };
29 /** Extract the doc entry for a single declaration. */
30 private extractDeclaration;
31 /** Gets the list of exported declarations for doc extraction. */
32 private getExportedDeclarations;
33}