1
|
/**
|
2
|
* @license
|
3
|
* Copyright Google Inc. All Rights Reserved.
|
4
|
*
|
5
|
* Use of this source code is governed by an MIT-style license that can be
|
6
|
* found in the LICENSE file at https://angular.io/license
|
7
|
*/
|
8
|
import { Summary, SummaryResolver } from '../summary_resolver';
|
9
|
import { StaticSymbol, StaticSymbolCache } from './static_symbol';
|
10
|
export interface AotSummaryResolverHost {
|
11
|
/**
|
12
|
* Loads an NgModule/Directive/Pipe summary file
|
13
|
*/
|
14
|
loadSummary(filePath: string): string | null;
|
15
|
/**
|
16
|
* Returns whether a file is a source file or not.
|
17
|
*/
|
18
|
isSourceFile(sourceFilePath: string): boolean;
|
19
|
/**
|
20
|
* Returns the output file path of a source file.
|
21
|
* E.g.
|
22
|
* `some_file.ts` -> `some_file.d.ts`
|
23
|
*/
|
24
|
getOutputFileName(sourceFilePath: string): string;
|
25
|
}
|
26
|
export declare class AotSummaryResolver implements SummaryResolver<StaticSymbol> {
|
27
|
private host;
|
28
|
private staticSymbolCache;
|
29
|
private summaryCache;
|
30
|
private loadedFilePaths;
|
31
|
private importAs;
|
32
|
constructor(host: AotSummaryResolverHost, staticSymbolCache: StaticSymbolCache);
|
33
|
isLibraryFile(filePath: string): boolean;
|
34
|
getLibraryFileName(filePath: string): string;
|
35
|
resolveSummary(staticSymbol: StaticSymbol): Summary<StaticSymbol>;
|
36
|
getSymbolsOf(filePath: string): StaticSymbol[];
|
37
|
getImportAs(staticSymbol: StaticSymbol): StaticSymbol;
|
38
|
addSummary(summary: Summary<StaticSymbol>): void;
|
39
|
private _loadSummaryFile(filePath);
|
40
|
}
|