|
| 1 | +{{ log.debug("Rendering " + constructor_signature.path) }} |
| 2 | + |
| 3 | +<div class="doc doc-object doc-constructor_signature"> |
| 4 | + {% with obj = constructor_signature, html_id = constructor_signature.path %} |
| 5 | + |
| 6 | + {% if root %} |
| 7 | + {% set show_full_path = config.show_root_full_path %} |
| 8 | + {% set root_members = True %} |
| 9 | + {% elif root_members %} |
| 10 | + {% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %} |
| 11 | + {% set root_members = False %} |
| 12 | + {% else %} |
| 13 | + {% set show_full_path = config.show_object_full_path %} |
| 14 | + {% endif %} |
| 15 | + |
| 16 | + {% set constructor_signature_name = constructor_signature.path if show_full_path else constructor_signature.name %} |
| 17 | + {% set symbol_type = "method" if constructor_signature.parent.is_class else "constructor_signature" %} |
| 18 | + |
| 19 | + {% if not root or config.show_root_heading %} |
| 20 | + {% filter heading( |
| 21 | + heading_level, |
| 22 | + role="constructor_signature", |
| 23 | + id=html_id, |
| 24 | + class="doc doc-heading", |
| 25 | + toc_label=(('<code class="doc-symbol doc-symbol-toc doc-symbol-' + symbol_type + '"></code> ')|safe if config.show_symbol_type_toc else '') + constructor_signature.name, |
| 26 | + ) %} |
| 27 | + |
| 28 | + {% block heading scoped %} |
| 29 | + {% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-{{ symbol_type }}"></code>{% endif %} |
| 30 | + {% if config.separate_signature %} |
| 31 | + <span class="doc doc-object-name doc-constructor_signature-name">{{ constructor_signature_name }}</span> |
| 32 | + {% else %} |
| 33 | + {%+ filter highlight(language="typescript", inline=True) %} |
| 34 | + {{ constructor_signature_name }} |
| 35 | + {% endfilter %} |
| 36 | + {% endif %} |
| 37 | + {% endblock heading %} |
| 38 | + |
| 39 | + {% endfilter %} |
| 40 | + |
| 41 | + {% block signature scoped %} |
| 42 | + {% if config.separate_signature %} |
| 43 | + {% for signature in constructor_signature.signatures %} |
| 44 | + {% filter highlight(language="typescript", inline=False) %} |
| 45 | + {{ signature.source_contents }} |
| 46 | + {% endfilter %} |
| 47 | + {% endfor %} |
| 48 | + {% endif %} |
| 49 | + {% endblock signature %} |
| 50 | + |
| 51 | + {% else %} |
| 52 | + |
| 53 | + {% if config.show_root_toc_entry %} |
| 54 | + {% filter heading( |
| 55 | + heading_level, |
| 56 | + role="constructor_signature", |
| 57 | + id=html_id, |
| 58 | + toc_label=(('<code class="doc-symbol doc-symbol-toc doc-symbol-' + symbol_type + '"></code> ')|safe if config.show_symbol_type_toc else '') + constructor_signature.name, |
| 59 | + hidden=True, |
| 60 | + ) %} |
| 61 | + {% endfilter %} |
| 62 | + {% endif %} |
| 63 | + {% set heading_level = heading_level - 1 %} |
| 64 | + {% endif %} |
| 65 | + |
| 66 | + <div class="doc doc-contents {% if root %}first{% endif %}"> |
| 67 | + {% block contents scoped %} |
| 68 | + {% block docstring scoped %} |
| 69 | + {% if constructor_signature.comment %} |
| 70 | + {{ constructor_signature.comment.markdown(symbol_map=constructor_signature.symbol_map)|convert_markdown(heading_level, html_id) }} |
| 71 | + {% endif %} |
| 72 | + {% endblock docstring %} |
| 73 | + {% endblock contents %} |
| 74 | + </div> |
| 75 | + {% endwith %} |
| 76 | +</div> |
0 commit comments