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

Method findChild

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

167 * @returns Child with the given id.
168 */
169 public findChild(id: string): IConstruct {
170 const ret = this.tryFindChild(id);
171 if (!ret) {
172 throw new Error(`No child with id: '${id}'`);
173 }
174 return ret;
175 }
176
177 /**
178 * 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