docs: document eachChild callback function (#6253)

This commit is contained in:
Alexander Vakrilov
2018-09-17 22:34:26 +03:00
committed by GitHub
parent 2d14c56014
commit 1db1e81174
2 changed files with 13 additions and 1 deletions

View File

@@ -253,7 +253,15 @@ export abstract class ViewBase extends Observable {
public bind(options: BindingOptions, source?: Object): void;
public unbind(property: string): void;
/**
* Invalidates the layout of the view and triggers a new layout pass.
*/
public requestLayout(): void;
/**
* Iterates over children of type ViewBase.
* @param callback Called for each child of type ViewBase. Iteration stops if this method returns falsy value.
*/
public eachChild(callback: (child: ViewBase) => boolean): void;
public _addView(view: ViewBase, atIndex?: number): void;

View File

@@ -576,7 +576,11 @@ export abstract class View extends ViewBase {
_getNativeViewsCount(): number;
_eachLayoutView(callback: (View) => void): void;
/**
* Iterates over children of type View.
* @param callback Called for each child of type View. Iteration stops if this method returns falsy value.
*/
public eachChildView(callback: (view: View) => boolean): void;
//@private