source: trip-planner-front/node_modules/@angular/compiler-cli/ngcc/src/rendering/rendering_formatter.d.ts

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/// <amd-module name="@angular/compiler-cli/ngcc/src/rendering/rendering_formatter" />
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9import { Statement } from '@angular/compiler';
10import MagicString from 'magic-string';
11import * as ts from 'typescript';
12import { Reexport } from '../../../src/ngtsc/imports';
13import { Import, ImportManager } from '../../../src/ngtsc/translator';
14import { ModuleWithProvidersInfo } from '../analysis/module_with_providers_analyzer';
15import { ExportInfo } from '../analysis/private_declarations_analyzer';
16import { CompiledClass } from '../analysis/types';
17import { SwitchableVariableDeclaration } from '../host/ngcc_host';
18/**
19 * The collected decorators that have become redundant after the compilation
20 * of Ivy static fields. The map is keyed by the container node, such that we
21 * can tell if we should remove the entire decorator property
22 */
23export declare type RedundantDecoratorMap = Map<ts.Node, ts.Node[]>;
24export declare const RedundantDecoratorMap: MapConstructor;
25/**
26 * Implement this interface with methods that know how to render a specific format,
27 * such as ESM5 or UMD.
28 */
29export interface RenderingFormatter {
30 addConstants(output: MagicString, constants: string, file: ts.SourceFile): void;
31 addImports(output: MagicString, imports: Import[], sf: ts.SourceFile): void;
32 addExports(output: MagicString, entryPointBasePath: string, exports: ExportInfo[], importManager: ImportManager, file: ts.SourceFile): void;
33 addDirectExports(output: MagicString, exports: Reexport[], importManager: ImportManager, file: ts.SourceFile): void;
34 addDefinitions(output: MagicString, compiledClass: CompiledClass, definitions: string): void;
35 addAdjacentStatements(output: MagicString, compiledClass: CompiledClass, statements: string): void;
36 removeDecorators(output: MagicString, decoratorsToRemove: RedundantDecoratorMap): void;
37 rewriteSwitchableDeclarations(outputText: MagicString, sourceFile: ts.SourceFile, declarations: SwitchableVariableDeclaration[]): void;
38 addModuleWithProvidersParams(outputText: MagicString, moduleWithProviders: ModuleWithProvidersInfo[], importManager: ImportManager): void;
39 printStatement(stmt: Statement, sourceFile: ts.SourceFile, importManager: ImportManager): string;
40}
Note: See TracBrowser for help on using the repository browser.