refactor(core): Removed readonly getters and changed to readonly (#19842)
variables PR Close #19842
This commit is contained in:
@ -481,6 +481,8 @@ class NgModuleRef_ implements NgModuleData, InternalNgModuleRef<any> {
|
||||
/** @internal */
|
||||
_providers: any[];
|
||||
|
||||
readonly injector: Injector = this;
|
||||
|
||||
constructor(
|
||||
private _moduleType: Type<any>, public _parent: Injector,
|
||||
public _bootstrapComponents: Type<any>[], public _def: NgModuleDefinition) {
|
||||
@ -496,8 +498,6 @@ class NgModuleRef_ implements NgModuleData, InternalNgModuleRef<any> {
|
||||
|
||||
get componentFactoryResolver() { return this.get(ComponentFactoryResolver); }
|
||||
|
||||
get injector(): Injector { return this; }
|
||||
|
||||
destroy(): void {
|
||||
if (this._destroyed) {
|
||||
throw new Error(
|
||||
|
@ -649,9 +649,8 @@ class DebugRendererFactory2 implements RendererFactory2 {
|
||||
|
||||
|
||||
class DebugRenderer2 implements Renderer2 {
|
||||
constructor(private delegate: Renderer2) {}
|
||||
|
||||
get data() { return this.delegate.data; }
|
||||
readonly data: {[key: string]: any};
|
||||
constructor(private delegate: Renderer2) { this.data = this.delegate.data; }
|
||||
|
||||
destroyNode(node: any) {
|
||||
removeDebugNodeFromIndex(getDebugNode(node) !);
|
||||
|
Reference in New Issue
Block a user