UNPKG

1.41 kBTypeScriptView Raw
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 */
8import { CompileTypeSummary } from './compile_metadata';
9import { Type } from './core';
10export interface Summary<T> {
11 symbol: T;
12 metadata: any;
13 type?: CompileTypeSummary;
14}
15export declare abstract class SummaryResolver<T> {
16 abstract isLibraryFile(fileName: string): boolean;
17 abstract toSummaryFileName(fileName: string, referringSrcFileName: string): string;
18 abstract fromSummaryFileName(fileName: string, referringLibFileName: string): string;
19 abstract resolveSummary(reference: T): Summary<T> | null;
20 abstract getSymbolsOf(filePath: string): T[] | null;
21 abstract getImportAs(reference: T): T;
22 abstract getKnownModuleName(fileName: string): string | null;
23 abstract addSummary(summary: Summary<T>): void;
24}
25export declare class JitSummaryResolver implements SummaryResolver<Type> {
26 private _summaries;
27 isLibraryFile(): boolean;
28 toSummaryFileName(fileName: string): string;
29 fromSummaryFileName(fileName: string): string;
30 resolveSummary(reference: Type): Summary<Type> | null;
31 getSymbolsOf(): Type[];
32 getImportAs(reference: Type): Type;
33 getKnownModuleName(fileName: string): null;
34 addSummary(summary: Summary<Type>): void;
35}