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
5ec4fb2f2a
commit
b2a8466e45
@ -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