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
|
/**
|
9
|
* Extract i18n messages from source code
|
10
|
*/
|
11
|
import 'reflect-metadata';
|
12
|
import * as compiler from '@angular/compiler';
|
13
|
import * as tsc from '@angular/tsc-wrapped';
|
14
|
import * as ts from 'typescript';
|
15
|
import { CompilerHost, CompilerHostContext } from './compiler_host';
|
16
|
export declare class Extractor {
|
17
|
private options;
|
18
|
private ngExtractor;
|
19
|
host: ts.CompilerHost;
|
20
|
private ngCompilerHost;
|
21
|
private program;
|
22
|
constructor(options: tsc.AngularCompilerOptions, ngExtractor: compiler.Extractor, host: ts.CompilerHost, ngCompilerHost: CompilerHost, program: ts.Program);
|
23
|
extract(formatName: string, outFile: string | null): Promise<string[]>;
|
24
|
extractBundle(): Promise<compiler.MessageBundle>;
|
25
|
serialize(bundle: compiler.MessageBundle, formatName: string): string;
|
26
|
getExtension(formatName: string): string;
|
27
|
static create(options: tsc.AngularCompilerOptions, program: ts.Program, tsCompilerHost: ts.CompilerHost, locale?: string | null, compilerHostContext?: CompilerHostContext, ngCompilerHost?: CompilerHost): Extractor;
|
28
|
}
|