build(docs-infra): display long overload parameter types as object
(#24976)
In some overloads, the parameter type can be a large anonymous object type. This change displays such types as `object`. It is then up to the documentation author to put more information about the type in the method usage notes. PR Close #24976
This commit is contained in:
parent
61cd5f7c0f
commit
03417df54e
@ -54,7 +54,7 @@
|
|||||||
</div>{% endif %}
|
</div>{% endif %}
|
||||||
|
|
||||||
<h6 class="no-anchor">Parameters</h6>
|
<h6 class="no-anchor">Parameters</h6>
|
||||||
{$ params.renderParameters(overload.parameterDocs, cssClass + '-parameters', cssClass + '-parameter') $}
|
{$ params.renderParameters(overload.parameterDocs, cssClass + '-parameters', cssClass + '-parameter', true) $}
|
||||||
|
|
||||||
{% if overload.type or overload.returns.type %}
|
{% if overload.type or overload.returns.type %}
|
||||||
<h6 class="no-anchor">Returns</h6>
|
<h6 class="no-anchor">Returns</h6>
|
||||||
@ -157,7 +157,7 @@
|
|||||||
{% if method.description -%}
|
{% if method.description -%}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="description">
|
<td class="description">
|
||||||
{$ method.description | marked({ h3: 'h4' }) $}
|
{$ method.description | marked({ h3: 'h5' }) $}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
@ -165,7 +165,8 @@
|
|||||||
{% if method.usageNotes -%}
|
{% if method.usageNotes -%}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="usage-notes">
|
<td class="usage-notes">
|
||||||
{$ method.usageNotes | marked({ h3: 'h4' }) $}
|
<h4 id="{$ method.anchor $}-usage-notes">Usage Notes</h4>
|
||||||
|
{$ method.usageNotes | marked({ h3: 'h5' }) $}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -21,10 +21,7 @@
|
|||||||
<a id="{$ parameter.anchor $}"></a>
|
<a id="{$ parameter.anchor $}"></a>
|
||||||
<code>{$ parameter.name $}</code>
|
<code>{$ parameter.name $}</code>
|
||||||
</td>
|
</td>
|
||||||
<td class="param-type">
|
{% if showType %}<td class="param-type"><code>{% if r/^\{/.test(parameter.type) and r/\}$/.test(parameter.type) and parameter.type.length > 20 %}object{% else %}{$ parameter.type $}{% endif %}</code></td>{% endif %}
|
||||||
<a><span><code>{$ parameter.type $}</code></span></a>
|
|
||||||
</td>
|
|
||||||
{% if showType %}<td class="param-type"><code>{$ parameter.type $}</code></td>{% endif %}
|
|
||||||
<td class="param-description">
|
<td class="param-description">
|
||||||
{% marked %}
|
{% marked %}
|
||||||
{% if (parameter.shortDescription | trim) or (parameter.description | trim) %}{$ parameter.shortDescription + '\n\n' + parameter.description $}
|
{% if (parameter.shortDescription | trim) or (parameter.description | trim) %}{$ parameter.shortDescription + '\n\n' + parameter.description $}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user