refactor(ivy): save check methods separately (#21795) (#21905)

PR Close #21795

PR Close #21905
This commit is contained in:
Kara Erickson
2018-01-25 20:41:57 -08:00
committed by Jason Aden
parent 81306c1f61
commit 9dca5f2743
6 changed files with 73 additions and 77 deletions

View File

@ -200,31 +200,58 @@ export interface TView {
firstTemplatePass: boolean;
/**
* Array of ngOnInit and ngDoCheck hooks that should be executed for this view.
* Array of ngOnInit and ngDoCheck hooks that should be executed for this view in
* creation mode.
*
* Even indices: Flags (1st bit: hook type, remaining: directive index)
* Even indices: Directive index
* Odd indices: Hook function
*/
initHooks: HookData|null;
/**
* Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed for
* this view.
* Array of ngDoCheck hooks that should be executed for this view in update mode.
*
* Even indices: Flags (1st bit: hook type, remaining: directive index)
* Even indices: Directive index
* Odd indices: Hook function
*/
checkHooks: HookData|null;
/**
* Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed
* for this view in creation mode.
*
* Even indices: Directive index
* Odd indices: Hook function
*/
contentHooks: HookData|null;
/**
* Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
* this view.
* Array of ngAfterContentChecked hooks that should be executed for this view in update
* mode.
*
* Even indices: Flags (1st bit: hook type, remaining: directive index)
* Even indices: Directive index
* Odd indices: Hook function
*/
contentCheckHooks: HookData|null;
/**
* Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
* this view in creation mode.
*
* Even indices: Directive index
* Odd indices: Hook function
*/
viewHooks: HookData|null;
/**
* Array of ngAfterViewChecked hooks that should be executed for this view in
* update mode.
*
* Even indices: Directive index
* Odd indices: Hook function
*/
viewCheckHooks: HookData|null;
/**
* Array of ngOnDestroy hooks that should be executed when this view is destroyed.
*
@ -237,7 +264,7 @@ export interface TView {
/**
* Array of hooks that should be executed for a view and their directive indices.
*
* Even indices: Flags (1st bit: hook type, remaining: directive index)
* Even indices: Directive index
* Odd indices: Hook function
*/
export type HookData = (number | (() => void))[];