{% 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.isGetAccessor or member.isReadonly) and not member.isSetAccessor %}get {% endif -%} {%- if member.isSetAccessor and not member.isGetAccessor %}set {% endif -%} {%- if member.isStatic %}static {% 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) -%} {% if overload.description and (overload.description != method.description) %}{$ overload.description | marked $}{% endif %} {$ renderMemberSyntax(overload) $}

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 %} {%- endmacro -%} {%- macro renderMethodDetail(method, cssClass) -%} {% if method.overloads.length == 0 %} {% elseif method.overloads.length < 3 -%} {% for overload in method.overloads -%} {% endfor -%} {% else -%} {% endif %}

{$ method.name $}()

{% if method.description %}{$ method.description | marked $}{% endif %}
{$ 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 %}
{% endmacro -%} {%- macro renderMethodDetails(methods, containerClass, itemClass, headingText) -%} {% if methods.length %}

{$ headingText $}

{% for member in methods %}{% if not member.internal %} {$ renderMethodDetail(member, itemClass) $} {% endif %}{% endfor %}
{% endif %} {%- endmacro -%} {%- macro renderProperties(properties, containerClass, propertyClass, headingText) -%} {%- if properties.length -%}

{$ headingText $}

{% for property in properties %}{% if not property.internal %} {% endif %}{% endfor %}
PropertyTypeDescription
{$ property.name $} {$ (property.description or property.constructorParamDoc.description) | marked $} {% if property.constructorParamDoc %} Declared in constructor.{% endif %}
{%- endif -%} {%- endmacro -%}