( node: ContainerNode, query: NodeQuery )
| 488 | * ``` |
| 489 | */ |
| 490 | export function findChild<T extends DesignNode = DesignNode>( |
| 491 | node: ContainerNode, |
| 492 | query: NodeQuery |
| 493 | ): T | null { |
| 494 | return (node.children.find((child) => matchNode(child, query)) as T) ?? null |
| 495 | } |
| 496 | |
| 497 | /** |
| 498 | * Find all direct children that match the query. |
no test coverage detected