{% import "lib/githubLinks.html" as github -%}
{% 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.boundTo %}@{$ member.boundTo.type $}(
{%- if member.boundTo.propertyName != member.boundTo.bindingName %}'{$ member.boundTo.bindingName $}'{% endif -%}
)
{% endif -%}
{%- if member.accessibility !== 'public' %}{$ member.accessibility $} {% endif -%}
{%- if member.isAbstract %}abstract {% 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.shortDescription and (overload.shortDescription != method.shortDescription) %}
{% if method.isCallMember %}call signature {% elseif method.isNewMember %}construct signature {% else %}{$ method.name $}() {% endif %}{$ github.githubLinks(method, versionInfo) $} |
---|
{$ method.shortDescription | marked $} |
{$ renderOverloadInfo(method, cssClass + '-overload', method) $} |
{$ renderOverloadInfo(method, cssClass + '-overload', method) $} |
{$ renderOverloadInfo(overload, cssClass + '-overload', method) $} |
|
{$ method.description | marked({ h3: 'h4' }) $} |
{$ method.usageNotes | marked({ h3: 'h4' }) $} |
{$ ancestor.doc.name $}
{$ renderMemberSyntax(member) $}