refactor(compiler): renames
- `NgHost` to `CompilerHost` - `AotCompilerHost.resolveFileToImport` to `AotCompilerHost.fileNameToModuleName` - `AotCompilerHoset.resolveImportToFile` to `AotCompilerHost.moduleNameToFileName`
This commit is contained in:

committed by
Chuck Jazdzewski

parent
dddbb1c1cb
commit
adeea5d86a
@ -511,12 +511,12 @@ class MockAotCompilerHost implements AotCompilerHost {
|
||||
|
||||
loadResource(filePath: string): Promise<string> { throw new Error('Should not be called!'); }
|
||||
|
||||
resolveFileToImport(importedFilePath: string, containingFilePath: string): string {
|
||||
fileNameToModuleName(importedFilePath: string, containingFilePath: string): string {
|
||||
throw new Error('Should not be called!');
|
||||
}
|
||||
|
||||
// In tests, assume that symbols are not re-exported
|
||||
resolveImportToFile(modulePath: string, containingFile?: string): string {
|
||||
moduleNameToFileName(modulePath: string, containingFile?: string): string {
|
||||
function splitPath(path: string): string[] { return path.split(/\/|\\/g); }
|
||||
|
||||
function resolvePath(pathParts: string[]): string {
|
||||
|
@ -253,7 +253,7 @@ function createOperatorFn(op: o.BinaryOperator) {
|
||||
}
|
||||
|
||||
export class SimpleJsImportGenerator implements ImportResolver {
|
||||
resolveFileToImport(importedUrlStr: string, moduleUrlStr: string): string {
|
||||
fileNameToModuleName(importedUrlStr: string, moduleUrlStr: string): string {
|
||||
return importedUrlStr;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user