Skip to content

Commit 42fba94

Browse files
committed
Fix double Type Parameters heading render
Resolves #2054
1 parent 1adaf60 commit 42fba94

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
### Bug Fixes
99

1010
- TypeDoc will now prefer comments on variable declarations over signature comments, #2042.
11+
- Fixed double rendering of "Type Parameters" header, #2054.
1112
- Removed unused `widgets.png` and `[email protected]` files from generated assets folder.
1213

1314
## v0.23.14 (2022-09-03)

src/lib/output/themes/default/partials/member.declaration.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@ export const memberDeclaration = (context: DefaultThemeRenderContext, props: Dec
2626

2727
{context.comment(props)}
2828

29-
{hasTypeParameters(props) && (
30-
<>
31-
<h4 class="tsd-type-parameters-title">Type Parameters</h4>
32-
{context.typeParameters(props.typeParameters)}
33-
</>
34-
)}
29+
{hasTypeParameters(props) && context.typeParameters(props.typeParameters)}
30+
3531
{props.type instanceof ReflectionType && (
3632
<div class="tsd-type-declaration">
3733
<h4>Type declaration</h4>

src/lib/output/themes/default/partials/member.signature.body.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ export const memberSignatureBody = (
1212
{renderFlags(props.flags, props.comment)}
1313
{context.comment(props)}
1414

15-
{hasTypeParameters(props) && (
16-
<div class="tsd-type-parameters">
17-
<h4 class="tsd-type-parameters-title">Type Parameters</h4>
18-
{context.typeParameters(props.typeParameters)}
19-
</div>
20-
)}
15+
{hasTypeParameters(props) && context.typeParameters(props.typeParameters)}
16+
2117
{props.parameters && props.parameters.length > 0 && (
2218
<div class="tsd-parameters">
2319
<h4 class="tsd-parameters-title">Parameters</h4>

0 commit comments

Comments
 (0)