Skip to content

Commit 6e842fc

Browse files
alexeaglevikerman
authored andcommitted
feat(ngc): allow ngc implementations to provide XHR (angular#10708)
1 parent 50c7952 commit 6e842fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/@angular/compiler-cli/src/codegen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ export class CodeGenerator {
118118

119119
static create(
120120
options: AngularCompilerOptions, program: ts.Program, compilerHost: ts.CompilerHost,
121-
reflectorHostContext?: ReflectorHostContext): CodeGenerator {
122-
const xhr: compiler.XHR = {
121+
reflectorHostContext?: ReflectorHostContext, xhr?: compiler.XHR): CodeGenerator {
122+
xhr = xhr || {
123123
get: (s: string) => {
124124
if (!compilerHost.fileExists(s)) {
125125
// TODO: We should really have a test for error cases like this!

0 commit comments

Comments
 (0)