Skip to content

Commit

Permalink
refactor(core): change lifecycle abstract classes to interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzmitry Shylovich authored and Dzmitry Shylovich committed Oct 15, 2016
1 parent 33c8948 commit e14096a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions modules/@angular/core/src/metadata/lifecycle_hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export var LIFECYCLE_HOOKS_VALUES = [
*
* @stable
*/
export abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges): void; }
export interface OnChanges { ngOnChanges(changes: SimpleChanges): void; }

/**
* @whatItDoes Lifecycle hook that is called after data-bound properties of a directive are
Expand All @@ -66,7 +66,7 @@ export abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges):
*
* @stable
*/
export abstract class OnInit { abstract ngOnInit(): void; }
export interface OnInit { ngOnInit(): void; }

/**
* @whatItDoes Lifecycle hook that is called when Angular dirty checks a directive.
Expand All @@ -89,7 +89,7 @@ export abstract class OnInit { abstract ngOnInit(): void; }
*
* @stable
*/
export abstract class DoCheck { abstract ngDoCheck(): void; }
export interface DoCheck { ngDoCheck(): void; }

/**
* @whatItDoes Lifecycle hook that is called when a directive or pipe is destroyed.
Expand All @@ -104,7 +104,7 @@ export abstract class DoCheck { abstract ngDoCheck(): void; }
*
* @stable
*/
export abstract class OnDestroy { abstract ngOnDestroy(): void; }
export interface OnDestroy { ngOnDestroy(): void; }

/**
*
Expand All @@ -118,7 +118,7 @@ export abstract class OnDestroy { abstract ngOnDestroy(): void; }
*
* @stable
*/
export abstract class AfterContentInit { abstract ngAfterContentInit(): void; }
export interface AfterContentInit { ngAfterContentInit(): void; }

/**
* @whatItDoes Lifecycle hook that is called after every check of a directive's content.
Expand All @@ -130,7 +130,7 @@ export abstract class AfterContentInit { abstract ngAfterContentInit(): void; }
*
* @stable
*/
export abstract class AfterContentChecked { abstract ngAfterContentChecked(): void; }
export interface AfterContentChecked { ngAfterContentChecked(): void; }

/**
* @whatItDoes Lifecycle hook that is called after a component's view has been fully
Expand All @@ -143,7 +143,7 @@ export abstract class AfterContentChecked { abstract ngAfterContentChecked(): vo
*
* @stable
*/
export abstract class AfterViewInit { abstract ngAfterViewInit(): void; }
export interface AfterViewInit { ngAfterViewInit(): void; }

/**
* @whatItDoes Lifecycle hook that is called after every check of a component's view.
Expand All @@ -155,4 +155,4 @@ export abstract class AfterViewInit { abstract ngAfterViewInit(): void; }
*
* @stable
*/
export abstract class AfterViewChecked { abstract ngAfterViewChecked(): void; }
export interface AfterViewChecked { ngAfterViewChecked(): void; }
28 changes: 14 additions & 14 deletions tools/public_api_guard/core/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/** @stable */
export declare abstract class AfterContentChecked {
abstract ngAfterContentChecked(): void;
export declare interface AfterContentChecked {
ngAfterContentChecked(): void;
}

/** @stable */
export declare abstract class AfterContentInit {
abstract ngAfterContentInit(): void;
export declare interface AfterContentInit {
ngAfterContentInit(): void;
}

/** @stable */
export declare abstract class AfterViewChecked {
abstract ngAfterViewChecked(): void;
export declare interface AfterViewChecked {
ngAfterViewChecked(): void;
}

/** @stable */
export declare abstract class AfterViewInit {
abstract ngAfterViewInit(): void;
export declare interface AfterViewInit {
ngAfterViewInit(): void;
}

/** @experimental */
Expand Down Expand Up @@ -621,18 +621,18 @@ export declare class NgZone {
export declare const NO_ERRORS_SCHEMA: SchemaMetadata;

/** @stable */
export declare abstract class OnChanges {
abstract ngOnChanges(changes: SimpleChanges): void;
export declare interface OnChanges {
ngOnChanges(changes: SimpleChanges): void;
}

/** @stable */
export declare abstract class OnDestroy {
abstract ngOnDestroy(): void;
export declare interface OnDestroy {
ngOnDestroy(): void;
}

/** @stable */
export declare abstract class OnInit {
abstract ngOnInit(): void;
export declare interface OnInit {
ngOnInit(): void;
}

/** @stable */
Expand Down

0 comments on commit e14096a

Please sign in to comment.