{% import "lib/paramList.html" as params -%} {%- macro renderHeritage(exportDoc) -%} {%- if exportDoc.extendsClauses.length %} extends {% for clause in exportDoc.extendsClauses -%} {$ clause.text $}{% if not loop.last %}, {% endif -%} {% endfor %}{% endif %} {%- if exportDoc.implementsClauses.length %} implements {% for clause in exportDoc.implementsClauses -%} {$ clause.text $}{% if not loop.last %}, {% endif -%} {% endfor %}{% endif %} {%- endmacro -%} {%- macro renderMembers(doc) -%} {%- for member in doc.staticProperties %}{% if not member.internal %} {$ renderMemberSyntax(member, 1) $}{% endif %}{% endfor -%} {% for member in doc.staticMethods %}{% if not member.internal %} {$ renderMemberSyntax(member, 1) $}{% endif %}{% endfor -%} {% if doc.constructorDoc and not doc.constructorDoc.internal %} {$ renderMemberSyntax(doc.constructorDoc, 1) $}{% endif -%} {% for member in doc.properties %}{% if not member.internal %} {$ renderMemberSyntax(member, 1) $}{% endif %}{% endfor -%} {% for member in doc.methods %}{% if not member.internal %} {$ renderMemberSyntax(member, 1) $}{% endif %}{% endfor -%} {%- for ancestor in doc.extendsClauses %}{% if ancestor.doc %} // inherited from {$ ancestor.doc.id $}{$ renderMembers(ancestor.doc) $}{% endif %}{% endfor -%} {%- endmacro -%} {%- macro renderMemberSyntax(member, truncateLines) -%} {%- if member.accessibility !== 'public' %}{$ member.accessibility $} {% endif -%} {%- if member.isAbstract %}abstract {% endif -%} {%- if member.isStatic %}static {% endif -%} {%- if (member.isGetAccessor or member.isReadonly) and not member.isSetAccessor %}get {% endif -%} {%- if member.isSetAccessor and not member.isGetAccessor %}set {% endif -%} {$ member.name $}{$ member.typeParameters | escape $}{% if not member.isGetAccessor %}{$ params.paramList(member.parameters, truncateLines) | trim $}{% endif %} {%- if member.isOptional %}?{% endif -%} {$ params.returnType(member.type) | trim | truncateCode(truncateLines) $} {%- endmacro -%} {%- macro renderOverloadInfo(overload, cssClass, method) -%} {$ renderMemberSyntax(overload) $} {% if overload.shortDescription and (overload.shortDescription != method.shortDescription) %}
{$ overload.shortDescription | marked $}
{% endif %}

Parameters

{$ params.renderParameters(overload.parameterDocs, cssClass + '-parameters', cssClass + '-parameter') $} {% if overload.type or overload.returns.type %}

Returns

{% marked %}`{$ (overload.type or overload.returns.type) $}`{% if overload.returns %}: {$ overload.returns.description $}{% endif %}{% endmarked %} {% endif %} {% if overload.throws.length %}

Throws

{% for error in overload.throws %} {% marked %}`{$ (error.typeList or 'Error') $}` {$ error.description $}{% endmarked %} {% endfor %} {% endif %} {% if overload.description and (overload.description != method.description) -%}
{$ overload.description | marked $}
{%- endif %} {%- endmacro -%} {%- macro renderMethodDetail(method, cssClass) -%} {% if method.name !== 'constructor' %}{% endif %} {% if method.shortDescription %}{% endif %} {% if method.overloads.length == 0 %} {% elseif method.overloads.length < 3 -%} {% for overload in method.overloads -%} {% endfor -%} {% else -%} {% endif %} {% if method.description %}{% endif %}

{% if method.isCallMember %}call signature {% elseif method.isNewMember %}construct signature {% else %}{$ method.name $}() {% endif %}

{$ method.shortDescription | marked $}
{$ renderOverloadInfo(method, cssClass + '-overload', method) $}
{$ renderOverloadInfo(overload, cssClass + '-overload', method) $}

{$ method.overloads.length $} overloads...

{% for overload in method.overloads %} {$ renderOverloadInfo(overload, cssClass + '-overload', method) $} {% if not loop.last %}
{% endif %} {% endfor %}
{$ method.description | marked $}
{% endmacro -%} {%- macro renderMethodDetails(methods, containerClass, itemClass, headingText) -%} {% set nonInternalMethods = methods | filterByPropertyValue('internal', undefined) %} {% if nonInternalMethods.length %}

{$ headingText $}

{% for member in nonInternalMethods %} {$ renderMethodDetail(member, itemClass) $} {% endfor %}
{% endif %} {%- endmacro -%} {%- macro renderProperties(properties, containerClass, propertyClass, headingText, headings) -%} {% set nonInternalProperties = properties | filterByPropertyValue('internal', undefined) %} {% set hasTypes = properties | hasValues('type') %} {% if nonInternalProperties.length -%}

{$ headingText $}

{% if hasTypes %}{% endif %} {% for property in nonInternalProperties %} {% if hasTypes %}{% endif %} {% endfor %}
{$ headings[0] or 'Property' $}{$ headings[1] or 'Type' $}{$ headings[2] or 'Description' $}
{$ property.name $} {%- if (property.isGetAccessor or property.isReadonly) and not property.isSetAccessor %}Read-only.{% endif %} {% if property.shortDescription %}{$ property.shortDescription | marked $}{% endif %} {$ (property.description or property.constructorParamDoc.description) | marked $} {% if property.constructorParamDoc %} Declared in constructor.{% endif %}
{%- endif -%} {%- endmacro -%}