Pete Bacon Darwin 97e02c2fa0 build(aio): render class/interface "descendants" in API docs (#19343)
For classes, the tree of subclasses is rendered, recursively.

For interfaces, the descendants are separated into child interfaces, which
extend the interface, and classes, which implement the interface.

Closes #19306
2017-09-25 11:59:44 -07:00

14 lines
556 B
HTML

{% macro renderDescendants(doc, docType, title='', recursed=false) %}
{% set descendants = doc.descendants | filterByPropertyValue('docType', docType) %}
{% if descendants.length %}
{% if title %}<h2>{$ title $}</h2>{% endif %}
<ul {% if not recursed %}class="descendants {$ docType $}"{% endif %}>
{% for descendant in descendants %}
<li>
<pre class="prettyprint lang-ts"><code>{$ descendant.name $}</code></pre>
{$ renderDescendants(descendant, docType, '', true) $}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}