Skip to content

Commit 1ebddd6

Browse files
committed
Fix object types with methods
Closes #1788
1 parent 7072f73 commit 1ebddd6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### Bug Fixes
44

5+
- Fixed display of object types containing methods, #1788.
56
- Fixed conversion of intrinsic string mapping types when converting without a type node, #2079.
67

78
## v0.23.17 (2022-10-18)

src/lib/output/themes/default/partials/type.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,22 @@ const typeRenderers: {
338338
continue;
339339
}
340340

341+
if (item.signatures) {
342+
for (const sig of item.signatures) {
343+
members.push(
344+
<>
345+
{item.name}
346+
{item.flags.isOptional && <span class="tsd-signature-symbol">?</span>}
347+
{context.memberSignatureTitle(sig, {
348+
hideName: true,
349+
arrowStyle: false,
350+
})}
351+
</>
352+
);
353+
}
354+
continue;
355+
}
356+
341357
members.push(
342358
<>
343359
{item.name}

0 commit comments

Comments
 (0)