1 | import { AstEntity } from '../analyzer/AstEntity';
|
2 | import { AstNamespaceImport } from '../analyzer/AstNamespaceImport';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare class CollectorEntity {
|
13 | |
14 |
|
15 |
|
16 | readonly astEntity: AstEntity;
|
17 | private _exportNames;
|
18 | private _exportNamesSorted;
|
19 | private _singleExportName;
|
20 | private _nameForEmit;
|
21 | private _sortKey;
|
22 | private _astNamespaceImports;
|
23 | constructor(astEntity: AstEntity);
|
24 | /**
|
25 | * The declaration name that will be emitted in a .d.ts rollup. For non-exported declarations,
|
26 | * Collector._makeUniqueNames() may need to rename the declaration to avoid conflicts with other declarations
|
27 | * in that module.
|
28 | */
|
29 | get nameForEmit(): string | undefined;
|
30 | set nameForEmit(value: string | undefined);
|
31 | /**
|
32 | * If this symbol is exported from the entry point, the list of export names.
|
33 | *
|
34 | * @remarks
|
35 | * Note that a given symbol may be exported more than once:
|
36 | * ```
|
37 | * class X { }
|
38 | * export { X }
|
39 | * export { X as Y }
|
40 | * ```
|
41 | */
|
42 | get exportNames(): ReadonlySet<string>;
|
43 | /**
|
44 | * If exportNames contains only one string, then singleExportName is that string.
|
45 | * In all other cases, it is undefined.
|
46 | */
|
47 | get singleExportName(): string | undefined;
|
48 | /**
|
49 | * This is true if exportNames contains only one string, and the declaration can be exported using the inline syntax
|
50 | * such as "export class X { }" instead of "export { X }".
|
51 | */
|
52 | get shouldInlineExport(): boolean;
|
53 | /**
|
54 | * Returns true if this symbol is an export for the entry point being analyzed.
|
55 | */
|
56 | get exported(): boolean;
|
57 | /**
|
58 | * Indicates that it is possible for a consumer of the API to access this declaration, either by importing
|
59 | * it directly, or via some other alias such as a member of a namespace. If a collector entity is not consumable,
|
60 | * then API Extractor will report a ExtractorMessageId.ForgottenExport warning.
|
61 | *
|
62 | * @remarks
|
63 | * Generally speaking, an API item is consumable if:
|
64 | *
|
65 | * - The collector encounters it while crawling the entry point, and it is a root symbol
|
66 | * (i.e. there is a corresponding a CollectorEntity)
|
67 | *
|
68 | * - AND it is exported by the entry point
|
69 | *
|
70 | * However a special case occurs with `AstNamespaceImport` which produces a rollup like this:
|
71 | *
|
72 | * ```ts
|
73 | * declare interface IForgottenExport { }
|
74 | *
|
75 | * declare function member(): IForgottenExport;
|
76 | *
|
77 | * declare namespace ns {
|
78 | * export {
|
79 | * member
|
80 | * }
|
81 | * }
|
82 | * export { ns }
|
83 | * ```
|
84 | *
|
85 | * In this example, `IForgottenExport` is not consumable. Whereas `member()` is consumable as `ns.member()`
|
86 | * even though `member()` itself is not exported.
|
87 | */
|
88 | get consumable(): boolean;
|
89 | /**
|
90 | * Associates this entity with a `AstNamespaceImport`.
|
91 | */
|
92 | addAstNamespaceImports(astNamespaceImport: AstNamespaceImport): void;
|
93 | /**
|
94 | * Adds a new exportName to the exportNames set.
|
95 | */
|
96 | addExportName(exportName: string): void;
|
97 | /**
|
98 | * A sorting key used by DtsRollupGenerator._makeUniqueNames()
|
99 | */
|
100 | getSortKey(): string;
|
101 | }
|
102 | //# sourceMappingURL=CollectorEntity.d.ts.map |
\ | No newline at end of file |