aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components/type_definition.tsx
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-05-11 23:38:51 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-05-14 16:35:13 +0800
commitb74957acdfc8d67d154bcb4698acd7575db7cc47 (patch)
tree3f33c2faac3b55e52098ab0b5b9883a9b62f5aee /packages/react-docs/src/components/type_definition.tsx
parent6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b (diff)
downloaddexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar
dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.gz
dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.bz2
dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.lz
dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.xz
dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.zst
dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.zip
Add missing type definitions
Diffstat (limited to 'packages/react-docs/src/components/type_definition.tsx')
-rw-r--r--packages/react-docs/src/components/type_definition.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx
index 605b58fbd..a8e601ac2 100644
--- a/packages/react-docs/src/components/type_definition.tsx
+++ b/packages/react-docs/src/components/type_definition.tsx
@@ -3,7 +3,7 @@ import * as _ from 'lodash';
import * as React from 'react';
import { DocsInfo } from '../docs_info';
-import { CustomType, CustomTypeChild, KindString, TypeDocTypes } from '../types';
+import { CustomType, CustomTypeChild, EnumValue, KindString, TypeDocTypes } from '../types';
import { constants } from '../utils/constants';
import { utils } from '../utils/utils';
@@ -35,7 +35,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
shouldShowAnchor: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const customType = this.props.customType;
if (!this.props.docsInfo.isPublicType(customType.name)) {
return null; // no-op
@@ -129,7 +129,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
</div>
);
}
- private _setAnchorVisibility(shouldShowAnchor: boolean) {
+ private _setAnchorVisibility(shouldShowAnchor: boolean): void {
this.setState({
shouldShowAnchor,
});
@@ -150,7 +150,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
*
* Each property description should be on a new line.
*/
- private _formatComment(text: string) {
+ private _formatComment(text: string): string {
const NEW_LINE_REGEX = /(\r\n|\n|\r)/gm;
const sanitizedText = text.replace(NEW_LINE_REGEX, ' ');
const PROPERTY_DESCRIPTION_DIVIDER = ':';