diff options
Diffstat (limited to 'packages/react-docs')
-rw-r--r-- | packages/react-docs/src/components/interface.tsx | 3 | ||||
-rw-r--r-- | packages/react-docs/src/components/type.tsx | 1 | ||||
-rw-r--r-- | packages/react-docs/src/utils/typedoc_utils.ts | 10 |
3 files changed, 10 insertions, 4 deletions
diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx index 541e164e3..bdfdf47c4 100644 --- a/packages/react-docs/src/components/interface.tsx +++ b/packages/react-docs/src/components/interface.tsx @@ -19,7 +19,7 @@ export function Interface(props: InterfaceProps) { return ( <span key={`property-${property.name}-${property.type}-${type.name}`}> {property.name}:{' '} - {property.type.typeDocType !== TypeDocTypes.Reflection ? ( + {property.type && property.type.typeDocType !== TypeDocTypes.Reflection ? ( <Type type={property.type} sectionName={props.sectionName} docsInfo={props.docsInfo} /> ) : ( <Signature @@ -27,7 +27,6 @@ export function Interface(props: InterfaceProps) { returnType={property.type.method.returnType} parameters={property.type.method.parameters} typeParameter={property.type.method.typeParameter} - callPath={property.type.method.callPath} sectionName={props.sectionName} shouldHideMethodName={true} shouldUseArrowSyntax={true} diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index fd4562ce3..2b7b49672 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -109,7 +109,6 @@ export function Type(props: TypeProps): any { returnType={type.method.returnType} parameters={type.method.parameters} typeParameter={type.method.typeParameter} - callPath={type.method.callPath} sectionName={props.sectionName} shouldHideMethodName={true} shouldUseArrowSyntax={true} diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 02f5b4049..e9035def0 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -14,6 +14,7 @@ import { Type, TypeDocNode, TypeDocType, + TypeDocTypes, TypeParameter, TypescriptFunction, TypescriptMethod, @@ -221,9 +222,16 @@ export const typeDocUtils = { const childrenIfExist = !_.isUndefined(entity.children) ? _.map(entity.children, (child: TypeDocNode) => { - const childTypeIfExists = !_.isUndefined(child.type) + let childTypeIfExists = !_.isUndefined(child.type) ? typeDocUtils._convertType(child.type, sections, sectionName, docId) : undefined; + if (child.kindString === KindString.Method) { + childTypeIfExists = { + name: child.name, + typeDocType: TypeDocTypes.Reflection, + method: this._convertMethod(child, isConstructor, sections, sectionName, docId), + }; + } const c: CustomTypeChild = { name: child.name, type: childTypeIfExists, |