* Remove the child with the given name, if present. * * @returns Whether a child with the given name was deleted.
(childName: string)
| 428 | * @returns Whether a child with the given name was deleted. |
| 429 | */ |
| 430 | public tryRemoveChild(childName: string): boolean { |
| 431 | if (!this._children || !(childName in this._children)) { return false; } |
| 432 | delete this._children[childName]; |
| 433 | return true; |
| 434 | } |
| 435 | |
| 436 | /** |
| 437 | * Adds a validation to this construct. |