MCPcopy Create free account
hub / github.com/aws/constructs / tryRemoveChild

Method tryRemoveChild

src/construct.ts:427–431  ·  view source on GitHub ↗

* Remove the child with the given name, if present. * * @returns Whether a child with the given name was deleted.

(childName: string)

Source from the content-addressed store, hash-verified

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

Callers 1

construct.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected