From 1ebddd6245abe0791f0ea46b29e7ee88313dd346 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 23 Oct 2022 13:17:34 -0600 Subject: [PATCH] Fix object types with methods Closes #1788 --- CHANGELOG.md | 1 + src/lib/output/themes/default/partials/type.tsx | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 201e149b1..42cad1cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Bug Fixes +- Fixed display of object types containing methods, #1788. - Fixed conversion of intrinsic string mapping types when converting without a type node, #2079. ## v0.23.17 (2022-10-18) diff --git a/src/lib/output/themes/default/partials/type.tsx b/src/lib/output/themes/default/partials/type.tsx index 6531aed74..3e0583103 100644 --- a/src/lib/output/themes/default/partials/type.tsx +++ b/src/lib/output/themes/default/partials/type.tsx @@ -338,6 +338,22 @@ const typeRenderers: { continue; } + if (item.signatures) { + for (const sig of item.signatures) { + members.push( + <> + {item.name} + {item.flags.isOptional && ?} + {context.memberSignatureTitle(sig, { + hideName: true, + arrowStyle: false, + })} + + ); + } + continue; + } + members.push( <> {item.name}