1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import ts from 'typescript';
|
9 | import { NgCompiler } from './core';
|
10 | import { UnifiedModulesHost } from './core/api';
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export interface PluginCompilerHost extends ts.CompilerHost, Partial<UnifiedModulesHost> {
|
19 | readonly inputFiles: ReadonlyArray<string>;
|
20 | }
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | interface TscPlugin {
|
27 | readonly name: string;
|
28 | wrapHost(host: ts.CompilerHost & Partial<UnifiedModulesHost>, inputFiles: ReadonlyArray<string>, options: ts.CompilerOptions): PluginCompilerHost;
|
29 | setupCompilation(program: ts.Program, oldProgram?: ts.Program): {
|
30 | ignoreForDiagnostics: Set<ts.SourceFile>;
|
31 | ignoreForEmit: Set<ts.SourceFile>;
|
32 | };
|
33 | getDiagnostics(file?: ts.SourceFile): ts.Diagnostic[];
|
34 | getOptionDiagnostics(): ts.Diagnostic[];
|
35 | getNextProgram(): ts.Program;
|
36 | createTransformers(): ts.CustomTransformers;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | export declare class NgTscPlugin implements TscPlugin {
|
42 | private ngOptions;
|
43 | name: string;
|
44 | private options;
|
45 | private host;
|
46 | private _compiler;
|
47 | get compiler(): NgCompiler;
|
48 | constructor(ngOptions: {});
|
49 | wrapHost(host: ts.CompilerHost & Partial<UnifiedModulesHost>, inputFiles: readonly string[], options: ts.CompilerOptions): PluginCompilerHost;
|
50 | setupCompilation(program: ts.Program, oldProgram?: ts.Program): {
|
51 | ignoreForDiagnostics: Set<ts.SourceFile>;
|
52 | ignoreForEmit: Set<ts.SourceFile>;
|
53 | };
|
54 | getDiagnostics(file?: ts.SourceFile): ts.Diagnostic[];
|
55 | getOptionDiagnostics(): ts.Diagnostic[];
|
56 | getNextProgram(): ts.Program;
|
57 | createTransformers(): ts.CustomTransformers;
|
58 | }
|
59 | export {};
|