refactor(compiler): renames

- `NgHost` to `CompilerHost`
- `AotCompilerHost.resolveFileToImport` to `AotCompilerHost.fileNameToModuleName`
- `AotCompilerHoset.resolveImportToFile` to `AotCompilerHost.moduleNameToFileName`
This commit is contained in:
Tobias Bosch
2016-11-17 12:24:33 -08:00
committed by Chuck Jazdzewski
parent 39a71eb0ec
commit 38be2b81c6
15 changed files with 92 additions and 86 deletions

View File

@ -214,7 +214,7 @@ export class StaticReflector implements ReflectorReader {
private resolveExportedSymbol(filePath: string, symbolName: string): StaticSymbol {
const resolveModule = (moduleName: string): string => {
const resolvedModulePath = this.host.resolveImportToFile(moduleName, filePath);
const resolvedModulePath = this.host.moduleNameToFileName(moduleName, filePath);
if (!resolvedModulePath) {
throw new Error(`Could not resolve module '${moduleName}' relative to file ${filePath}`);
}
@ -269,7 +269,7 @@ export class StaticReflector implements ReflectorReader {
return symbol;
}
try {
const filePath = this.host.resolveImportToFile(module, containingFile);
const filePath = this.host.moduleNameToFileName(module, containingFile);
if (!filePath) {
// If the file cannot be found the module is probably referencing a declared module