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
@ -18,10 +18,12 @@ export class UmdReflectionHost extends Esm5ReflectionHost {
|
||||
protected umdModules = new Map<ts.SourceFile, UmdModule|null>();
|
||||
protected umdExports = new Map<ts.SourceFile, Map<string, Declaration>|null>();
|
||||
protected umdImportPaths = new Map<ts.ParameterDeclaration, string|null>();
|
||||
constructor(
|
||||
logger: Logger, isCore: boolean, protected program: ts.Program,
|
||||
protected compilerHost: ts.CompilerHost, dts?: BundleProgram|null) {
|
||||
super(logger, isCore, program.getTypeChecker(), dts);
|
||||
protected program: ts.Program;
|
||||
protected compilerHost: ts.CompilerHost;
|
||||
constructor(logger: Logger, isCore: boolean, src: BundleProgram, dts?: BundleProgram|null) {
|
||||
super(logger, isCore, src, dts);
|
||||
this.program = src.program;
|
||||
this.compilerHost = src.host;
|
||||
}
|
||||
|
||||
getImportOfIdentifier(id: ts.Identifier): Import|null {
|
||||
|
Reference in New Issue
Block a user