1 | import * as ts from 'typescript';
|
2 | import AngularCompilerOptions from './options';
|
3 | import { VinylFile } from './vinyl_file';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export interface CompilerInterface {
|
10 | readConfiguration(project: string | VinylFile, basePath: string, existingOptions?: ts.CompilerOptions): {
|
11 | parsed: ts.ParsedCommandLine;
|
12 | ngOptions: AngularCompilerOptions;
|
13 | };
|
14 | typeCheck(compilerHost: ts.CompilerHost, program: ts.Program): void;
|
15 | emit(program: ts.Program): number;
|
16 | }
|
17 | export declare class UserError extends Error {
|
18 | private _nativeError;
|
19 | constructor(message: string);
|
20 | message: string;
|
21 | name: string;
|
22 | stack: any;
|
23 | toString(): string;
|
24 | }
|
25 | export declare function formatDiagnostics(diags: ts.Diagnostic[]): string;
|
26 | export declare function check(diags: ts.Diagnostic[]): void;
|
27 | export declare function validateAngularCompilerOptions(options: AngularCompilerOptions): ts.Diagnostic[];
|
28 | export declare class Tsc implements CompilerInterface {
|
29 | private readFile;
|
30 | private readDirectory;
|
31 | private parseConfigHost;
|
32 | constructor(readFile?: (path: string, encoding?: string) => string, readDirectory?: (path: string, extensions?: string[], exclude?: string[], include?: string[]) => string[]);
|
33 | readConfiguration(project: string | VinylFile, basePath: string, existingOptions?: ts.CompilerOptions): {
|
34 | parsed: ts.ParsedCommandLine;
|
35 | ngOptions: any;
|
36 | };
|
37 | typeCheck(compilerHost: ts.CompilerHost, program: ts.Program): void;
|
38 | emit(program: ts.Program): number;
|
39 | }
|
40 | export declare const tsc: CompilerInterface;
|