1 | /// <amd-module name="@angular/compiler-cli/ngcc/src/rendering/dts_renderer" />
|
---|
2 | import * as ts from 'typescript';
|
---|
3 | import { ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
|
---|
4 | import { Reexport } from '../../../src/ngtsc/imports';
|
---|
5 | import { Logger } from '../../../src/ngtsc/logging';
|
---|
6 | import { CompileResult } from '../../../src/ngtsc/transform';
|
---|
7 | import { ModuleWithProvidersAnalyses, ModuleWithProvidersInfo } from '../analysis/module_with_providers_analyzer';
|
---|
8 | import { ExportInfo, PrivateDeclarationsAnalyses } from '../analysis/private_declarations_analyzer';
|
---|
9 | import { DecorationAnalyses } from '../analysis/types';
|
---|
10 | import { NgccReflectionHost } from '../host/ngcc_host';
|
---|
11 | import { EntryPointBundle } from '../packages/entry_point_bundle';
|
---|
12 | import { RenderingFormatter } from './rendering_formatter';
|
---|
13 | import { FileToWrite } from './utils';
|
---|
14 | /**
|
---|
15 | * A structure that captures information about what needs to be rendered
|
---|
16 | * in a typings file.
|
---|
17 | *
|
---|
18 | * It is created as a result of processing the analysis passed to the renderer.
|
---|
19 | *
|
---|
20 | * The `renderDtsFile()` method consumes it when rendering a typings file.
|
---|
21 | */
|
---|
22 | declare class DtsRenderInfo {
|
---|
23 | classInfo: DtsClassInfo[];
|
---|
24 | moduleWithProviders: ModuleWithProvidersInfo[];
|
---|
25 | privateExports: ExportInfo[];
|
---|
26 | reexports: Reexport[];
|
---|
27 | }
|
---|
28 | /**
|
---|
29 | * Information about a class in a typings file.
|
---|
30 | */
|
---|
31 | export interface DtsClassInfo {
|
---|
32 | dtsDeclaration: ts.Declaration;
|
---|
33 | compilation: CompileResult[];
|
---|
34 | }
|
---|
35 | /**
|
---|
36 | * A base-class for rendering an `AnalyzedFile`.
|
---|
37 | *
|
---|
38 | * Package formats have output files that must be rendered differently. Concrete sub-classes must
|
---|
39 | * implement the `addImports`, `addDefinitions` and `removeDecorators` abstract methods.
|
---|
40 | */
|
---|
41 | export declare class DtsRenderer {
|
---|
42 | private dtsFormatter;
|
---|
43 | private fs;
|
---|
44 | private logger;
|
---|
45 | private host;
|
---|
46 | private bundle;
|
---|
47 | constructor(dtsFormatter: RenderingFormatter, fs: ReadonlyFileSystem, logger: Logger, host: NgccReflectionHost, bundle: EntryPointBundle);
|
---|
48 | renderProgram(decorationAnalyses: DecorationAnalyses, privateDeclarationsAnalyses: PrivateDeclarationsAnalyses, moduleWithProvidersAnalyses: ModuleWithProvidersAnalyses | null): FileToWrite[];
|
---|
49 | renderDtsFile(dtsFile: ts.SourceFile, renderInfo: DtsRenderInfo): FileToWrite[];
|
---|
50 | private getTypingsFilesToRender;
|
---|
51 | }
|
---|
52 | export {};
|
---|