Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Commit

Permalink
Added generic type alias styles
Browse files Browse the repository at this point in the history
Icons and styles to render generic type aliases, including icon and type parameter output.
  • Loading branch information
rklfss committed Oct 13, 2017
1 parent b79ff37 commit a71ca47
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/default/assets/css/setup/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ $type-icons:
(enum),
(enum-member),
(signature),
(type-alias);
(type-alias),
('type-alias.tsd-has-type-parameter');

$member-icons:
(variable, property),
Expand Down
Binary file modified src/default/assets/images/icons.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/default/assets/images/icons.psd
Binary file not shown.
Binary file modified src/default/assets/images/icons@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/default/partials/footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>

</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
Expand Down
16 changes: 15 additions & 1 deletion src/default/partials/member.declaration.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<div class="tsd-signature tsd-kind-icon">{{#compact}}
{{{wbr name}}}<span class="tsd-signature-symbol">{{#if isOptional}}?{{/if}}:</span>&nbsp;{{#with type}}{{>type}}{{/with}}
{{{wbr name}}}
{{#if typeParameters}}
&lt;
{{#each typeParameters}}
{{#if @index}},&nbsp;{{/if}}
{{name}}
{{/each}}
&gt;
{{/if}}
<span class="tsd-signature-symbol">{{#if isOptional}}?{{/if}}:</span>&nbsp;{{#with type}}{{>type}}{{/with}}
{{#if defaultValue}}
<span class="tsd-signature-symbol">
&nbsp;=&nbsp;
Expand All @@ -12,6 +21,11 @@

{{> comment}}

{{#if typeParameters}}
<h4 class="tsd-type-parameters-title">Type parameters</h4>
{{> typeParameters}}
{{/if}}

{{#if type.declaration}}
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
Expand Down

0 comments on commit a71ca47

Please sign in to comment.