* 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)
| 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`. |
no test coverage detected