Skip to content

stabilize tryRemoveChild() #2267

@pahud

Description

@pahud

This method was introduced in 2020 from this PR and aws-cdk-lib has some adoption. As it's still marked as experimental, we've seen customers having concern about that in production but we don't seem to have other methods to remove a child from a Node.

constructs/src/construct.ts

Lines 369 to 379 in 80aa122

/**
* Remove the child with the given name, if present.
*
* @returns Whether a child with the given name was deleted.
* @experimental
*/
public tryRemoveChild(childName: string): boolean {
if (!(childName in this._children)) { return false; }
delete this._children[childName];
return true;
}

Please stabilize this method and remove the @experimental tag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions