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

Method findChild

src/construct.ts:143–149  ·  view source on GitHub ↗

* Return a direct child by id * * Throws an error if the child is not found. * * @param id Identifier of direct child * @returns Child with the given id.

(id: string)

Source from the content-addressed store, hash-verified

141 * @returns Child with the given id.
142 */
143 public findChild(id: string): IConstruct {
144 const ret = this.tryFindChild(id);
145 if (!ret) {
146 throw new Error(`No child with id: '${id}'`);
147 }
148 return ret;
149 }
150
151 /**
152 * Returns the child construct that has the id `Default` or `Resource`.

Callers 1

construct.test.tsFile · 0.80

Calls 1

tryFindChildMethod · 0.95

Tested by

no test coverage detected