1 | /// <amd-module name="@angular/compiler-cli/ngcc/src/analysis/switch_marker_analyzer" />
|
---|
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 | */
|
---|
9 | import * as ts from 'typescript';
|
---|
10 | import { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
|
---|
11 | import { NgccReflectionHost, SwitchableVariableDeclaration } from '../host/ngcc_host';
|
---|
12 | export interface SwitchMarkerAnalysis {
|
---|
13 | sourceFile: ts.SourceFile;
|
---|
14 | declarations: SwitchableVariableDeclaration[];
|
---|
15 | }
|
---|
16 | export declare type SwitchMarkerAnalyses = Map<ts.SourceFile, SwitchMarkerAnalysis>;
|
---|
17 | export declare const SwitchMarkerAnalyses: MapConstructor;
|
---|
18 | /**
|
---|
19 | * This Analyzer will analyse the files that have an R3 switch marker in them
|
---|
20 | * that will be replaced.
|
---|
21 | */
|
---|
22 | export declare class SwitchMarkerAnalyzer {
|
---|
23 | private host;
|
---|
24 | private packagePath;
|
---|
25 | constructor(host: NgccReflectionHost, packagePath: AbsoluteFsPath);
|
---|
26 | /**
|
---|
27 | * Analyze the files in the program to identify declarations that contain R3
|
---|
28 | * switch markers.
|
---|
29 | * @param program The program to analyze.
|
---|
30 | * @return A map of source files to analysis objects. The map will contain only the
|
---|
31 | * source files that had switch markers, and the analysis will contain an array of
|
---|
32 | * the declarations in that source file that contain the marker.
|
---|
33 | */
|
---|
34 | analyzeProgram(program: ts.Program): SwitchMarkerAnalyses;
|
---|
35 | }
|
---|