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

22 lines
843 B
HTML
Raw Normal View History

{% import "lib/paramList.html" as params -%}
{% extends 'export-base.template.html' -%}
{% block details %}
2017-06-29 17:23:27 -04:00
{% if doc.overloads.length === 1 %}
<code-example language="ts" hideCopy="true">
2017-06-29 17:23:27 -04:00
function {$ doc.overloads[0].name $}{$ params.paramList(doc.overloads[0].parameters) $}
{%- if doc.overloads[0].type %}: {$ doc.overloads[0].type | escape $}{% endif %};
</code-example>
{% include "includes/description.html" %}
2017-06-29 17:23:27 -04:00
{% else %}
<h2>Overloads</h2>{% for overload in doc.overloads %}
<code-example language="ts" hideCopy="true">
function {$ overload.name $}{$ params.paramList(overload.parameters) $}
{%- if overload.type %}: {$ overload.type | escape $}{% endif %};
</code-example>
<section class="description">
{$ overload.description | trimBlankLines | marked $}
</section>
{% endfor %}
{% endif %}
{% endblock %}