diff options
Diffstat (limited to 'packages/react-docs/src/components/interface.tsx')
-rw-r--r-- | packages/react-docs/src/components/interface.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx index 541e164e3..a881c7fec 100644 --- a/packages/react-docs/src/components/interface.tsx +++ b/packages/react-docs/src/components/interface.tsx @@ -13,13 +13,13 @@ export interface InterfaceProps { docsInfo: DocsInfo; } -export function Interface(props: InterfaceProps) { +export const Interface = (props: InterfaceProps) => { const type = props.type; const properties = _.map(type.children, property => { 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} @@ -64,4 +63,4 @@ export function Interface(props: InterfaceProps) { {`}`} </span> ); -} +}; |