aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components/signature.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/react-docs/src/components/signature.tsx')
-rw-r--r--packages/react-docs/src/components/signature.tsx24
1 files changed, 15 insertions, 9 deletions
diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index bf9c8be24..a690a1f03 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -1,8 +1,9 @@
import * as _ from 'lodash';
import * as React from 'react';
+import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '@0xproject/types';
+
import { DocsInfo } from '../docs_info';
-import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '../types';
import { Type } from './type';
@@ -134,14 +135,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>
);