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

Method tryRemoveChild

src/construct.ts:440–444  ·  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

438 * @returns Whether a child with the given name was deleted.
439 */
440 public tryRemoveChild(childName: string): boolean {
441 if (!this._children || !(childName in this._children)) { return false; }
442 delete this._children[childName];
443 return true;
444 }
445
446 /**
447 * Adds a validation to this construct.

Callers 1

construct.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected