Skip to content

Commit

Permalink
docs: tView.preOrderHooks and tView.preOrderCheckHooks docs update (#…
Browse files Browse the repository at this point in the history
…39497)

This commit updates the docs for the `tView.preOrderHooks` and `tView.preOrderCheckHooks` TView
fields. Current docs are not up-to-date as it was pointed out in #39439.

Closes #39439.

PR Close #39497
  • Loading branch information
AndrewKushnir authored and josephperrott committed Oct 29, 2020
1 parent 8c82106 commit 90acb91
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/core/src/render3/interfaces/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,16 +597,19 @@ export interface TView {
* Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in
* creation mode.
*
* Even indices: Directive index
* Odd indices: Hook function
* This array has a flat structure and contains TNode indices, directive indices (where an
* instance can be found in `LView`) and hook functions. TNode index is followed by the directive
* index and a hook function. If there are multiple hooks for a given TNode, the TNode index is
* not repeated and the next lifecycle hook information is stored right after the previous hook
* function. This is done so that at runtime the system can efficiently iterate over all of the
* functions to invoke without having to make any decisions/lookups.
*/
preOrderHooks: HookData|null;

/**
* Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.
*
* Even indices: Directive index
* Odd indices: Hook function
* This array has the same structure as the `preOrderHooks` one.
*/
preOrderCheckHooks: HookData|null;

Expand Down Expand Up @@ -697,8 +700,7 @@ export interface TView {

/**
* An array of indices pointing to directives with content queries alongside with the
* corresponding
* query index. Each entry in this array is a tuple of:
* corresponding query index. Each entry in this array is a tuple of:
* - index of the first content query index declared by a given directive;
* - index of a directive.
*
Expand Down

0 comments on commit 90acb91

Please sign in to comment.