Revert "refactor(core): Change abstract get
to readonly
(#19226)"
This reverts commit 3aa3d5c548
.
This commit is contained in:
@ -163,7 +163,7 @@ export abstract class ReflectiveInjector implements Injector {
|
||||
* expect(child.parent).toBe(parent);
|
||||
* ```
|
||||
*/
|
||||
readonly parent: Injector|null;
|
||||
abstract get parent(): Injector|null;
|
||||
|
||||
/**
|
||||
* Resolves an array of providers and creates a child injector from those providers.
|
||||
|
@ -26,32 +26,32 @@ export abstract class ComponentRef<C> {
|
||||
/**
|
||||
* Location of the Host Element of this Component Instance.
|
||||
*/
|
||||
readonly location: ElementRef;
|
||||
abstract get location(): ElementRef;
|
||||
|
||||
/**
|
||||
* The injector on which the component instance exists.
|
||||
*/
|
||||
readonly injector: Injector;
|
||||
abstract get injector(): Injector;
|
||||
|
||||
/**
|
||||
* The instance of the Component.
|
||||
*/
|
||||
readonly instance: C;
|
||||
abstract get instance(): C;
|
||||
|
||||
/**
|
||||
* The {@link ViewRef} of the Host View of this Component instance.
|
||||
*/
|
||||
readonly hostView: ViewRef;
|
||||
abstract get hostView(): ViewRef;
|
||||
|
||||
/**
|
||||
* The {@link ChangeDetectorRef} of the Component instance.
|
||||
*/
|
||||
readonly changeDetectorRef: ChangeDetectorRef;
|
||||
abstract get changeDetectorRef(): ChangeDetectorRef;
|
||||
|
||||
/**
|
||||
* The component type.
|
||||
*/
|
||||
readonly componentType: Type<any>;
|
||||
abstract get componentType(): Type<any>;
|
||||
|
||||
/**
|
||||
* Destroys the component instance and all of the data structures associated with it.
|
||||
@ -68,20 +68,20 @@ export abstract class ComponentRef<C> {
|
||||
* @stable
|
||||
*/
|
||||
export abstract class ComponentFactory<C> {
|
||||
readonly selector: string;
|
||||
readonly componentType: Type<any>;
|
||||
abstract get selector(): string;
|
||||
abstract get componentType(): Type<any>;
|
||||
/**
|
||||
* selector for all <ng-content> elements in the component.
|
||||
*/
|
||||
readonly ngContentSelectors: string[];
|
||||
abstract get ngContentSelectors(): string[];
|
||||
/**
|
||||
* the inputs of the component.
|
||||
*/
|
||||
readonly inputs: {propName: string, templateName: string}[];
|
||||
abstract get inputs(): {propName: string, templateName: string}[];
|
||||
/**
|
||||
* the outputs of the component.
|
||||
*/
|
||||
readonly outputs: {propName: string, templateName: string}[];
|
||||
abstract get outputs(): {propName: string, templateName: string}[];
|
||||
/**
|
||||
* Creates a new component.
|
||||
*/
|
||||
|
@ -24,18 +24,18 @@ export abstract class NgModuleRef<T> {
|
||||
/**
|
||||
* The injector that contains all of the providers of the NgModule.
|
||||
*/
|
||||
readonly injector: Injector;
|
||||
abstract get injector(): Injector;
|
||||
|
||||
/**
|
||||
* The ComponentFactoryResolver to get hold of the ComponentFactories
|
||||
* declared in the `entryComponents` property of the module.
|
||||
*/
|
||||
readonly componentFactoryResolver: ComponentFactoryResolver;
|
||||
abstract get componentFactoryResolver(): ComponentFactoryResolver;
|
||||
|
||||
/**
|
||||
* The NgModule instance.
|
||||
*/
|
||||
readonly instance: T;
|
||||
abstract get instance(): T;
|
||||
|
||||
/**
|
||||
* Destroys the module instance and all of the data structures associated with it.
|
||||
@ -58,6 +58,6 @@ export interface InternalNgModuleRef<T> extends NgModuleRef<T> {
|
||||
* @experimental
|
||||
*/
|
||||
export abstract class NgModuleFactory<T> {
|
||||
readonly moduleType: Type<T>;
|
||||
abstract get moduleType(): Type<T>;
|
||||
abstract create(parentInjector: Injector|null): NgModuleRef<T>;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ export abstract class TemplateRef<C> {
|
||||
*
|
||||
*/
|
||||
// TODO(i): rename to anchor or location
|
||||
readonly elementRef: ElementRef;
|
||||
abstract get elementRef(): ElementRef;
|
||||
|
||||
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
||||
}
|
||||
|
@ -37,11 +37,11 @@ export abstract class ViewContainerRef {
|
||||
* Anchor element that specifies the location of this container in the containing View.
|
||||
* <!-- TODO: rename to anchorElement -->
|
||||
*/
|
||||
readonly element: ElementRef;
|
||||
abstract get element(): ElementRef;
|
||||
|
||||
readonly injector: Injector;
|
||||
abstract get injector(): Injector;
|
||||
|
||||
readonly parentInjector: Injector;
|
||||
abstract get parentInjector(): Injector;
|
||||
|
||||
/**
|
||||
* Destroys all Views in this container.
|
||||
@ -56,7 +56,7 @@ export abstract class ViewContainerRef {
|
||||
/**
|
||||
* Returns the number of Views currently attached to this container.
|
||||
*/
|
||||
readonly length: number;
|
||||
abstract get length(): number;
|
||||
|
||||
/**
|
||||
* Instantiates an Embedded View based on the {@link TemplateRef `templateRef`} and inserts it
|
||||
|
@ -19,7 +19,7 @@ export abstract class ViewRef extends ChangeDetectorRef {
|
||||
*/
|
||||
abstract destroy(): void;
|
||||
|
||||
readonly destroyed: boolean;
|
||||
abstract get destroyed(): boolean;
|
||||
|
||||
abstract onDestroy(callback: Function): any /** TODO #9100 */;
|
||||
}
|
||||
@ -79,9 +79,9 @@ export abstract class ViewRef extends ChangeDetectorRef {
|
||||
* @experimental
|
||||
*/
|
||||
export abstract class EmbeddedViewRef<C> extends ViewRef {
|
||||
readonly context: C;
|
||||
abstract get context(): C;
|
||||
|
||||
readonly rootNodes: any[];
|
||||
abstract get rootNodes(): any[];
|
||||
}
|
||||
|
||||
export interface InternalViewRef extends ViewRef {
|
||||
|
@ -23,12 +23,12 @@ export class RenderComponentType {
|
||||
* @deprecated Debug info is handeled internally in the view engine now.
|
||||
*/
|
||||
export abstract class RenderDebugInfo {
|
||||
readonly injector: Injector;
|
||||
readonly component: any;
|
||||
readonly providerTokens: any[];
|
||||
readonly references: {[key: string]: any};
|
||||
readonly context: any;
|
||||
readonly source: string;
|
||||
abstract get injector(): Injector;
|
||||
abstract get component(): any;
|
||||
abstract get providerTokens(): any[];
|
||||
abstract get references(): {[key: string]: any};
|
||||
abstract get context(): any;
|
||||
abstract get source(): string;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -149,7 +149,7 @@ export abstract class Renderer2 {
|
||||
* This field can be used to store arbitrary data on this renderer instance.
|
||||
* This is useful for renderers that delegate to other renderers.
|
||||
*/
|
||||
readonly data: {[key: string]: any};
|
||||
abstract get data(): {[key: string]: any};
|
||||
|
||||
abstract destroy(): void;
|
||||
abstract createElement(name: string, namespace?: string|null): any;
|
||||
|
@ -479,15 +479,15 @@ export interface RootData {
|
||||
}
|
||||
|
||||
export abstract class DebugContext {
|
||||
readonly view: ViewData;
|
||||
readonly nodeIndex: number|null;
|
||||
readonly injector: Injector;
|
||||
readonly component: any;
|
||||
readonly providerTokens: any[];
|
||||
readonly references: {[key: string]: any};
|
||||
readonly context: any;
|
||||
readonly componentRenderElement: any;
|
||||
readonly renderNode: any;
|
||||
abstract get view(): ViewData;
|
||||
abstract get nodeIndex(): number|null;
|
||||
abstract get injector(): Injector;
|
||||
abstract get component(): any;
|
||||
abstract get providerTokens(): any[];
|
||||
abstract get references(): {[key: string]: any};
|
||||
abstract get context(): any;
|
||||
abstract get componentRenderElement(): any;
|
||||
abstract get renderNode(): any;
|
||||
abstract logError(console: Console, ...values: any[]): void;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user