diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-16 21:02:55 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-16 21:02:55 +0800 |
commit | 5175fe8107d4cad17617230ec32268c5f226c26f (patch) | |
tree | 4728f91e3c28136920c0a00993fd0e86c028bac1 /packages/react-docs/src | |
parent | 8d1e27a1a53f4c88ec9fefb5fd37b30c652782a6 (diff) | |
download | dexon-sol-tools-5175fe8107d4cad17617230ec32268c5f226c26f.tar dexon-sol-tools-5175fe8107d4cad17617230ec32268c5f226c26f.tar.gz dexon-sol-tools-5175fe8107d4cad17617230ec32268c5f226c26f.tar.bz2 dexon-sol-tools-5175fe8107d4cad17617230ec32268c5f226c26f.tar.lz dexon-sol-tools-5175fe8107d4cad17617230ec32268c5f226c26f.tar.xz dexon-sol-tools-5175fe8107d4cad17617230ec32268c5f226c26f.tar.zst dexon-sol-tools-5175fe8107d4cad17617230ec32268c5f226c26f.zip |
Handle reflection type in type rendering
Diffstat (limited to 'packages/react-docs/src')
-rw-r--r-- | packages/react-docs/src/components/type.tsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 56425a5df..b253f0397 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -9,6 +9,7 @@ import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '../types'; import { constants } from '../utils/constants'; import { utils } from '../utils/utils'; +import { MethodSignature } from './method_signature'; import { TypeDefinition } from './type_definition'; const typeToSection: { [typeName: string]: string } = { @@ -101,6 +102,19 @@ export function Type(props: TypeProps): any { }); break; + case TypeDocTypes.Reflection: + typeName = ( + <MethodSignature + method={type.method} + sectionName={props.sectionName} + shouldHideMethodName={true} + shouldUseArrowSyntax={true} + docsInfo={props.docsInfo} + typeDefinitionByName={props.typeDefinitionByName} + /> + ); + break; + case TypeDocTypes.TypeParameter: typeName = type.name; break; |