refactor(core): remove readonly getters in common, compiler (#19150)
PR Close #19150
This commit is contained in:
@ -51,9 +51,10 @@ export class ProviderElementContext {
|
||||
private _seenProviders = new Map<any, boolean>();
|
||||
private _allProviders: Map<any, ProviderAst>;
|
||||
private _attrs: {[key: string]: string};
|
||||
private _hasViewContainer: boolean = false;
|
||||
private _queriedTokens = new Map<any, QueryMatch[]>();
|
||||
|
||||
public readonly transformedHasViewContainer: boolean = false;
|
||||
|
||||
constructor(
|
||||
public viewContext: ProviderViewContext, private _parent: ProviderElementContext,
|
||||
private _isViewRoot: boolean, private _directiveAsts: DirectiveAst[], attrs: AttrAst[],
|
||||
@ -80,7 +81,7 @@ export class ProviderElementContext {
|
||||
});
|
||||
if (this._queriedTokens.get(
|
||||
this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef))) {
|
||||
this._hasViewContainer = true;
|
||||
this.transformedHasViewContainer = true;
|
||||
}
|
||||
|
||||
// create the providers that we know are eager first
|
||||
@ -122,8 +123,6 @@ export class ProviderElementContext {
|
||||
return sortedDirectives;
|
||||
}
|
||||
|
||||
get transformedHasViewContainer(): boolean { return this._hasViewContainer; }
|
||||
|
||||
get queryMatches(): QueryMatch[] {
|
||||
const allMatches: QueryMatch[] = [];
|
||||
this._queriedTokens.forEach((matches: QueryMatch[]) => { allMatches.push(...matches); });
|
||||
@ -249,7 +248,7 @@ export class ProviderElementContext {
|
||||
}
|
||||
if (tokenReference(dep.token) ===
|
||||
this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {
|
||||
this._hasViewContainer = true;
|
||||
(this as{transformedHasViewContainer: boolean}).transformedHasViewContainer = true;
|
||||
}
|
||||
}
|
||||
// access the injector
|
||||
|
Reference in New Issue
Block a user