refactor(ngcc): use bundle src to create reflection hosts (#34254)
Previously individual properties of the src bundle program were passed to the reflection host constructors. But going forward, more properties will be required. To prevent the signature getting continually larger and more unwieldy, this change just passes the whole src bundle to the constructor, allowing it to extract what it needs. PR Close #34254
This commit is contained in:

committed by
Kara Erickson

parent
dfecca29da
commit
0b837e2f0d
@ -70,8 +70,7 @@ function createTestRenderer(
|
||||
const isCore = packageName === '@angular/core';
|
||||
const bundle = makeTestEntryPointBundle(
|
||||
'test-package', 'esm2015', isCore, getRootFiles(files), dtsFiles && getRootFiles(dtsFiles));
|
||||
const typeChecker = bundle.src.program.getTypeChecker();
|
||||
const host = new Esm2015ReflectionHost(logger, isCore, typeChecker, bundle.dts);
|
||||
const host = new Esm2015ReflectionHost(logger, isCore, bundle.src, bundle.dts);
|
||||
const referencesRegistry = new NgccReferencesRegistry(host);
|
||||
const decorationAnalyses =
|
||||
new DecorationAnalyzer(fs, bundle, host, referencesRegistry).analyzeProgram();
|
||||
|
Reference in New Issue
Block a user