Skip to content

Commit

Permalink
Fix double Type Parameters heading render
Browse files Browse the repository at this point in the history
Resolves #2054
  • Loading branch information
Gerrit0 committed Sep 18, 2022
1 parent 1adaf60 commit 42fba94
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@
### Bug Fixes

- TypeDoc will now prefer comments on variable declarations over signature comments, #2042.
- Fixed double rendering of "Type Parameters" header, #2054.
- Removed unused `widgets.png` and `widgets@2x.png` files from generated assets folder.

## v0.23.14 (2022-09-03)
Expand Down
8 changes: 2 additions & 6 deletions src/lib/output/themes/default/partials/member.declaration.tsx
Expand Up @@ -26,12 +26,8 @@ export const memberDeclaration = (context: DefaultThemeRenderContext, props: Dec

{context.comment(props)}

{hasTypeParameters(props) && (
<>
<h4 class="tsd-type-parameters-title">Type Parameters</h4>
{context.typeParameters(props.typeParameters)}
</>
)}
{hasTypeParameters(props) && context.typeParameters(props.typeParameters)}

{props.type instanceof ReflectionType && (
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
Expand Down
Expand Up @@ -12,12 +12,8 @@ export const memberSignatureBody = (
{renderFlags(props.flags, props.comment)}
{context.comment(props)}

{hasTypeParameters(props) && (
<div class="tsd-type-parameters">
<h4 class="tsd-type-parameters-title">Type Parameters</h4>
{context.typeParameters(props.typeParameters)}
</div>
)}
{hasTypeParameters(props) && context.typeParameters(props.typeParameters)}

{props.parameters && props.parameters.length > 0 && (
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down

0 comments on commit 42fba94

Please sign in to comment.