mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 21:00:16 +08:00
Adding voiid return statements
This commit is contained in:

committed by
Vladimir Enchev

parent
69e651bb43
commit
dad1510ce9
8
ui/layouts/layout-base.d.ts
vendored
8
ui/layouts/layout-base.d.ts
vendored
@ -30,25 +30,25 @@
|
||||
* Adds the view to children array.
|
||||
* @param view The view to be added to the end of the children array.
|
||||
*/
|
||||
addChild(view: view.View);
|
||||
addChild(view: view.View): void;
|
||||
|
||||
/**
|
||||
* Inserts the view to children array at the specified index.
|
||||
* @param view The view to be added to the end of the children array.
|
||||
* @param atIndex The insertion index.
|
||||
*/
|
||||
insertChild(child: view.View, atIndex: number);
|
||||
insertChild(child: view.View, atIndex: number): void;
|
||||
|
||||
/**
|
||||
* Removes the specified view from the children array.
|
||||
* @param view The view to remove from the children array.
|
||||
*/
|
||||
removeChild(view: view.View);
|
||||
removeChild(view: view.View): void;
|
||||
|
||||
/**
|
||||
* Removes all views in this layout.
|
||||
*/
|
||||
removeChildren();
|
||||
removeChildren(): void;
|
||||
|
||||
/**
|
||||
* Gets or sets padding style property.
|
||||
|
@ -37,18 +37,18 @@ export class LayoutBase extends view.CustomLayoutView implements definition.Layo
|
||||
return view.getViewById(this, id);
|
||||
}
|
||||
|
||||
public addChild(child: view.View) {
|
||||
public addChild(child: view.View): void {
|
||||
// TODO: Do we need this method since we have the core logic in the View implementation?
|
||||
this._addView(child);
|
||||
this._subViews.push(child);
|
||||
}
|
||||
|
||||
public insertChild(child: view.View, atIndex: number) {
|
||||
public insertChild(child: view.View, atIndex: number): void {
|
||||
this._addView(child, atIndex);
|
||||
this._subViews.splice(atIndex, 0, child);
|
||||
}
|
||||
|
||||
public removeChild(child: view.View) {
|
||||
public removeChild(child: view.View): void {
|
||||
this._removeView(child);
|
||||
|
||||
// TODO: consider caching the index on the child.
|
||||
@ -56,13 +56,13 @@ export class LayoutBase extends view.CustomLayoutView implements definition.Layo
|
||||
this._subViews.splice(index, 1);
|
||||
}
|
||||
|
||||
public removeChildren() {
|
||||
public removeChildren(): void {
|
||||
while (this.getChildrenCount() != 0) {
|
||||
this.removeChild(this._subViews[this.getChildrenCount() - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
public _eachChildView(callback: (child: view.View) => boolean) {
|
||||
public _eachChildView(callback: (child: view.View) => boolean): void {
|
||||
var i;
|
||||
var length = this._subViews.length;
|
||||
var retVal: boolean;
|
||||
|
Reference in New Issue
Block a user