aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/react-docs/src/utils/typedoc_utils.ts17
1 files changed, 11 insertions, 6 deletions
diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts
index f1f42c36d..ad794c0fa 100644
--- a/packages/react-docs/src/utils/typedoc_utils.ts
+++ b/packages/react-docs/src/utils/typedoc_utils.ts
@@ -437,18 +437,23 @@ export const typeDocUtils = {
return typeDocUtils._convertType(t, sections, sectionName, docId);
});
- const isConstructor = false;
+ let indexSignatureIfExists;
+ let methodIfExists;
const doesIndexSignatureExist =
!_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature);
- let indexSignatureIfExists;
if (doesIndexSignatureExist) {
const indexSignature = entity.declaration.indexSignature as TypeDocNode;
indexSignatureIfExists = typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId);
+ } else if (!_.isUndefined(entity.declaration)) {
+ const isConstructor = false;
+ methodIfExists = typeDocUtils._convertMethod(
+ entity.declaration,
+ isConstructor,
+ sections,
+ sectionName,
+ docId,
+ );
}
- const methodIfExists =
- !_.isUndefined(entity.declaration) && !doesIndexSignatureExist
- ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId)
- : undefined;
const elementTypeIfExists = !_.isUndefined(entity.elementType)
? {