feat(ngc): allow ngc implementations to provide XHR (#10708)

This commit is contained in:
Alex Eagle 2016-08-11 15:04:00 -07:00 committed by vikerman
parent 50c795280f
commit 6e842fc5bf
1 changed files with 2 additions and 2 deletions

View File

@ -118,8 +118,8 @@ export class CodeGenerator {
static create( static create(
options: AngularCompilerOptions, program: ts.Program, compilerHost: ts.CompilerHost, options: AngularCompilerOptions, program: ts.Program, compilerHost: ts.CompilerHost,
reflectorHostContext?: ReflectorHostContext): CodeGenerator { reflectorHostContext?: ReflectorHostContext, xhr?: compiler.XHR): CodeGenerator {
const xhr: compiler.XHR = { xhr = xhr || {
get: (s: string) => { get: (s: string) => {
if (!compilerHost.fileExists(s)) { if (!compilerHost.fileExists(s)) {
// TODO: We should really have a test for error cases like this! // TODO: We should really have a test for error cases like this!