1 | import * as ts from 'typescript';
|
2 | import * as tsdoc from '@microsoft/tsdoc';
|
3 | import { INodePackageJson } from '@rushstack/node-core-library';
|
4 | /**
|
5 | * Constructor options for WorkingPackage
|
6 | */
|
7 | export interface IWorkingPackageOptions {
|
8 | packageFolder: string;
|
9 | packageJson: INodePackageJson;
|
10 | entryPointSourceFile: ts.SourceFile;
|
11 | }
|
12 | /**
|
13 | * Information about the working package for a particular invocation of API Extractor.
|
14 | *
|
15 | * @remarks
|
16 | * API Extractor tries to model the world as a collection of NPM packages, such that each
|
17 | * .d.ts file belongs to at most one package. When API Extractor is invoked on a project,
|
18 | * we refer to that project as being the "working package". There is exactly one
|
19 | * "working package" for the duration of this analysis. Any files that do not belong to
|
20 | * the working package are referred to as "external": external declarations belonging to
|
21 | * external packages.
|
22 | *
|
23 | * If API Extractor is invoked on a standalone .d.ts file, the "working package" may not
|
24 | * have an actual package.json file on disk, but we still refer to it in concept.
|
25 | */
|
26 | export declare class WorkingPackage {
|
27 | /**
|
28 | * Returns the folder for the package.json file of the working package.
|
29 | *
|
30 | * @remarks
|
31 | * If the entry point is `C:\Folder\project\src\index.ts` and the nearest package.json
|
32 | * is `C:\Folder\project\package.json`, then the packageFolder is `C:\Folder\project`
|
33 | */
|
34 | readonly packageFolder: string;
|
35 | /**
|
36 | * The parsed package.json file for the working package.
|
37 | */
|
38 | readonly packageJson: INodePackageJson;
|
39 | /**
|
40 | * The entry point being processed during this invocation of API Extractor.
|
41 | *
|
42 | * @remarks
|
43 | * The working package may have multiple entry points; however, today API Extractor
|
44 | * only processes a single entry point during an invocation. This will be improved
|
45 | * in the future.
|
46 | */
|
47 | readonly entryPointSourceFile: ts.SourceFile;
|
48 | /**
|
49 | * The `@packageDocumentation` comment, if any, for the working package.
|
50 | */
|
51 | tsdocComment: tsdoc.DocComment | undefined;
|
52 | /**
|
53 | * Additional parser information for `WorkingPackage.tsdocComment`.
|
54 | */
|
55 | tsdocParserContext: tsdoc.ParserContext | undefined;
|
56 | constructor(options: IWorkingPackageOptions);
|
57 | /**
|
58 | * Returns the full name of the working package.
|
59 | */
|
60 | get name(): string;
|
61 | }
|
62 | //# sourceMappingURL=WorkingPackage.d.ts.map |
\ | No newline at end of file |