1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC 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 { StaticReflector } from '../aot/static_reflector';
|
---|
9 | import { StaticSymbolResolver, StaticSymbolResolverHost } from '../aot/static_symbol_resolver';
|
---|
10 | import { AotSummaryResolverHost } from '../aot/summary_resolver';
|
---|
11 | import { CompileMetadataResolver } from '../metadata_resolver';
|
---|
12 | import { MessageBundle } from './message_bundle';
|
---|
13 | /**
|
---|
14 | * The host of the Extractor disconnects the implementation from TypeScript / other language
|
---|
15 | * services and from underlying file systems.
|
---|
16 | */
|
---|
17 | export interface ExtractorHost extends StaticSymbolResolverHost, AotSummaryResolverHost {
|
---|
18 | /**
|
---|
19 | * Converts a path that refers to a resource into an absolute filePath
|
---|
20 | * that can be later on used for loading the resource via `loadResource.
|
---|
21 | */
|
---|
22 | resourceNameToFileName(path: string, containingFile: string): string | null;
|
---|
23 | /**
|
---|
24 | * Loads a resource (e.g. html / css)
|
---|
25 | */
|
---|
26 | loadResource(path: string): Promise<string> | string;
|
---|
27 | }
|
---|
28 | export declare class Extractor {
|
---|
29 | host: ExtractorHost;
|
---|
30 | private staticSymbolResolver;
|
---|
31 | private messageBundle;
|
---|
32 | private metadataResolver;
|
---|
33 | constructor(host: ExtractorHost, staticSymbolResolver: StaticSymbolResolver, messageBundle: MessageBundle, metadataResolver: CompileMetadataResolver);
|
---|
34 | extract(rootFiles: string[]): Promise<MessageBundle>;
|
---|
35 | static create(host: ExtractorHost, locale: string | null): {
|
---|
36 | extractor: Extractor;
|
---|
37 | staticReflector: StaticReflector;
|
---|
38 | };
|
---|
39 | }
|
---|