withChild

fun <T : KoChildProvider> List<T>.withChild(indirectChildren: Boolean = false, predicate: (KoChildDeclaration) -> Boolean): List<T>

List containing declarations that have at least one child satisfying the provided predicate.

Return

A list containing declarations with at least one child satisfying the predicate.

Parameters

indirectChildren

Whether to include indirect children.

predicate

A function that defines the condition to be met by a child declaration.