Return types for some functions

This commit is contained in:
nathangray 2020-01-22 03:42:41 -07:00 committed by Hadi Nategh
parent 1e39e5e654
commit 3cbecd5270
3 changed files with 16 additions and 16 deletions

View File

@ -766,14 +766,14 @@ var et2_widget = /** @class */ (function (_super) {
/** /**
* Returns the array manager object for the given part * Returns the array manager object for the given part
* *
* @param {string} _part name of array mgr to return * @param {string} managed_array_type name of array mgr to return
*/ */
et2_widget.prototype.getArrayMgr = function (_part) { et2_widget.prototype.getArrayMgr = function (managed_array_type) {
if (this._mgrs && typeof this._mgrs[_part] != "undefined") { if (this._mgrs && typeof this._mgrs[managed_array_type] != "undefined") {
return this._mgrs[_part]; return this._mgrs[managed_array_type];
} }
else if (this._parent) { else if (this._parent) {
return this._parent.getArrayMgr(_part); return this._parent.getArrayMgr(managed_array_type);
} }
return null; return null;
}; };

File diff suppressed because one or more lines are too long

View File

@ -336,7 +336,7 @@ export class et2_widget extends ClassWithAttributes
/** /**
* Returns the parent widget of this widget * Returns the parent widget of this widget
*/ */
getParent() getParent() : et2_widget | null
{ {
return this._parent; return this._parent;
} }
@ -346,7 +346,7 @@ export class et2_widget extends ClassWithAttributes
/** /**
* Returns the list of children of this widget. * Returns the list of children of this widget.
*/ */
getChildren() getChildren() : et2_widget[]
{ {
return this._children; return this._children;
} }
@ -354,7 +354,7 @@ export class et2_widget extends ClassWithAttributes
/** /**
* Returns the base widget * Returns the base widget
*/ */
getRoot() getRoot() : et2_widget
{ {
if (this._parent != null) { if (this._parent != null) {
return this._parent.getRoot(); return this._parent.getRoot();
@ -428,7 +428,7 @@ export class et2_widget extends ClassWithAttributes
* *
* @param _id is the id you're searching for * @param _id is the id you're searching for
*/ */
getWidgetById(_id) getWidgetById(_id) : et2_widget | null
{ {
if (this.id == _id) { if (this.id == _id) {
return this; return this;
@ -444,7 +444,7 @@ export class et2_widget extends ClassWithAttributes
} }
if (this.id && _id.indexOf('[') > -1 && this._children.length) { if (this.id && _id.indexOf('[') > -1 && this._children.length) {
var ids = (new et2_arrayMgr()).explodeKey(_id); var ids = (new et2_arrayMgr()).explodeKey(_id);
var widget = this; var widget : et2_widget = this;
for (var i = 0; i < ids.length && widget !== null; i++) { for (var i = 0; i < ids.length && widget !== null; i++) {
widget = widget.getWidgetById(ids[i]); widget = widget.getWidgetById(ids[i]);
} }
@ -952,14 +952,14 @@ export class et2_widget extends ClassWithAttributes
/** /**
* Returns the array manager object for the given part * Returns the array manager object for the given part
* *
* @param {string} _part name of array mgr to return * @param {string} managed_array_type name of array mgr to return
*/ */
getArrayMgr(_part : string) getArrayMgr(managed_array_type : string)
{ {
if (this._mgrs && typeof this._mgrs[_part] != "undefined") { if (this._mgrs && typeof this._mgrs[managed_array_type] != "undefined") {
return this._mgrs[_part]; return this._mgrs[managed_array_type];
} else if (this._parent) { } else if (this._parent) {
return this._parent.getArrayMgr(_part); return this._parent.getArrayMgr(managed_array_type);
} }
return null; return null;