angular-cn/aio/tools/transforms/templates/api/function.template.html

24 lines
921 B
HTML

{% import "lib/paramList.html" as params -%}
{% extends 'export-base.template.html' -%}
{% block overview %}
<code-example language="ts" hideCopy="true" class="no-box api-heading">
function {$ doc.name $}{$ doc.typeParameters | escape $}{$ params.paramList(doc.parameters) $}
{%- if doc.type %}: {$ doc.type | escape $}{% endif %};
</code-example>
{% endblock %}
{% block details %}
{% include "includes/description.html" %}
{% if doc.overloads.length %}
<h2>Overloads</h2>{% for overload in doc.overloads %}
<code-example language="ts" hideCopy="true" class="no-box api-heading">
function {$ overload.name $}{$ doc.typeParameters | escape $}{$ params.paramList(overload.parameters) $}
{%- if overload.type %}: {$ overload.type | escape $}{% endif %};
</code-example>
<section class="description">
{$ overload.description | trimBlankLines | marked $}
</section>
{% endfor %}
{% endif %}
{% endblock %}