From 2b6a6530506bd80b88bf9c65b080a83eb3d3a9d2 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Wed, 27 May 2015 08:07:37 -0700 Subject: [PATCH] feat(core): added missing interfaces for onDestroy and onAllChangesDone lifecycle events --- modules/angular2/src/core/compiler/interfaces.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/angular2/src/core/compiler/interfaces.ts b/modules/angular2/src/core/compiler/interfaces.ts index 5a327f513f..a43bc89b91 100644 --- a/modules/angular2/src/core/compiler/interfaces.ts +++ b/modules/angular2/src/core/compiler/interfaces.ts @@ -5,3 +5,13 @@ import {StringMap} from 'angular2/src/facade/collection'; * properties are updated. */ export interface OnChange { onChange(changes: StringMap): void; } + +/** + * Defines lifecycle method [onDestroy] called when a directive is being destroyed. + */ +export interface OnDestroy { onDestroy(): void; } + +/** + * Defines lifecycle method [onAllChangesDone ] called when the bindings of all its children have been changed. + */ +export interface OnAllChangesDone { onAllChangesDone (): void; }