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
@ -559,8 +559,7 @@ runInEachFileSystem(() => {
|
||||
const bundle = makeTestEntryPointBundle('test-package', 'esm2015', false, rootFiles);
|
||||
const program = bundle.src.program;
|
||||
|
||||
const reflectionHost =
|
||||
new Esm2015ReflectionHost(new MockLogger(), false, program.getTypeChecker());
|
||||
const reflectionHost = new Esm2015ReflectionHost(new MockLogger(), false, bundle.src);
|
||||
const referencesRegistry = new NgccReferencesRegistry(reflectionHost);
|
||||
const analyzer = new DecorationAnalyzer(
|
||||
getFileSystem(), bundle, reflectionHost, referencesRegistry, error => errors.push(error));
|
||||
|
Reference in New Issue
Block a user