From b40861747b73bb9a0826853751b7caa5cbf085ae Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Tue, 25 Sep 2018 17:34:22 +0100
Subject: Properly render function generic types that don't extend another type

---
 packages/react-docs/src/components/signature.tsx | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

(limited to 'packages/react-docs/src/components/signature.tsx')

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index bf9c8be24..4f10f4665 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -134,14 +134,19 @@ function renderTypeParameter(
 ): React.ReactNode {
     const typeParam = (
         <span>
-            {`<${typeParameter.name} extends `}
-            <Type
-                type={typeParameter.type}
-                sectionName={sectionName}
-                typeDefinitionByName={typeDefinitionByName}
-                docsInfo={docsInfo}
-                isInPopover={isInPopover}
-            />
+            {`<${typeParameter.name}`}
+            {!_.isUndefined(typeParameter.type) && (
+                <span>
+                    {' extends '}
+                    <Type
+                        type={typeParameter.type}
+                        sectionName={sectionName}
+                        typeDefinitionByName={typeDefinitionByName}
+                        docsInfo={docsInfo}
+                        isInPopover={isInPopover}
+                    />
+                </span>
+            )}
             {`>`}
         </span>
     );
-- 
cgit 

