refactor(compiler): move findDeclaration into the StaticReflector

Previously, this was part of the `AotCompilerHost`.
The `AotCompilerHost` is now also greatly simplified.
This commit is contained in:
Tobias Bosch
2016-11-15 08:49:23 -08:00
committed by Chuck Jazdzewski
parent 912ca44979
commit 24099bdbd2
13 changed files with 612 additions and 704 deletions

View File

@ -6,14 +6,14 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ReflectorHostContext} from '@angular/compiler-cli/src/reflector_host';
import {NgHostContext} from '@angular/compiler-cli/src/ng_host';
import * as ts from 'typescript';
export type Entry = string | Directory;
export interface Directory { [name: string]: Entry; }
export class MockContext implements ReflectorHostContext {
export class MockContext implements NgHostContext {
constructor(public currentDirectory: string, private files: Entry) {}
fileExists(fileName: string): boolean { return typeof this.getEntry(fileName) === 'string'; }