refactor(core): change abstract classes for interfaces (#12324)
BREAKING CHANGE: Because all lifecycle hooks are now interfaces the code that uses 'extends' keyword will no longer compile. To migrate the code follow the example below: Before: ``` @Component() class SomeComponent extends OnInit {} ``` After: ``` @Component() class SomeComponent implements OnInit {} ``` we don't expect anyone to be affected by this change. Closes #10083
This commit is contained in:

committed by
Igor Minar

parent
a23634dfd0
commit
ee747f7d0c
32
tools/public_api_guard/core/typings/core.d.ts
vendored
32
tools/public_api_guard/core/typings/core.d.ts
vendored
@ -1,21 +1,21 @@
|
||||
/** @stable */
|
||||
export declare abstract class AfterContentChecked {
|
||||
abstract ngAfterContentChecked(): void;
|
||||
export interface AfterContentChecked {
|
||||
ngAfterContentChecked(): void;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class AfterContentInit {
|
||||
abstract ngAfterContentInit(): void;
|
||||
export interface AfterContentInit {
|
||||
ngAfterContentInit(): void;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class AfterViewChecked {
|
||||
abstract ngAfterViewChecked(): void;
|
||||
export interface AfterViewChecked {
|
||||
ngAfterViewChecked(): void;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class AfterViewInit {
|
||||
abstract ngAfterViewInit(): void;
|
||||
export interface AfterViewInit {
|
||||
ngAfterViewInit(): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
@ -385,8 +385,8 @@ export interface DirectiveDecorator {
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class DoCheck {
|
||||
abstract ngDoCheck(): void;
|
||||
export interface DoCheck {
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
@ -678,18 +678,18 @@ export declare class NgZone {
|
||||
export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class OnChanges {
|
||||
abstract ngOnChanges(changes: SimpleChanges): void;
|
||||
export interface OnChanges {
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class OnDestroy {
|
||||
abstract ngOnDestroy(): void;
|
||||
export interface OnDestroy {
|
||||
ngOnDestroy(): void;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class OnInit {
|
||||
abstract ngOnInit(): void;
|
||||
export interface OnInit {
|
||||
ngOnInit(): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
|
Reference in New Issue
Block a user