1
|
import { AngularCompilerOptions, ModuleMetadata } from '@angular/tsc-wrapped';
|
2
|
import * as ts from 'typescript';
|
3
|
import { CompilerHost, CompilerHostContext } from './compiler_host';
|
4
|
/**
|
5
|
* This version of the AotCompilerHost expects that the program will be compiled
|
6
|
* and executed with a "path mapped" directory structure, where generated files
|
7
|
* are in a parallel tree with the sources, and imported using a `./` relative
|
8
|
* import. This requires using TS `rootDirs` option and also teaching the module
|
9
|
* loader what to do.
|
10
|
*/
|
11
|
export declare class PathMappedCompilerHost extends CompilerHost {
|
12
|
constructor(program: ts.Program, options: AngularCompilerOptions, context: CompilerHostContext);
|
13
|
getCanonicalFileName(fileName: string): string;
|
14
|
moduleNameToFileName(m: string, containingFile: string): string | null;
|
15
|
/**
|
16
|
* We want a moduleId that will appear in import statements in the generated code.
|
17
|
* These need to be in a form that system.js can load, so absolute file paths don't work.
|
18
|
* Relativize the paths by checking candidate prefixes of the absolute path, to see if
|
19
|
* they are resolvable by the moduleResolution strategy from the CompilerHost.
|
20
|
*/
|
21
|
fileNameToModuleName(importedFile: string, containingFile: string): string;
|
22
|
getMetadataFor(filePath: string): ModuleMetadata[];
|
23
|
}
|