diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-11 23:38:51 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-14 16:35:13 +0800 |
commit | b74957acdfc8d67d154bcb4698acd7575db7cc47 (patch) | |
tree | 3f33c2faac3b55e52098ab0b5b9883a9b62f5aee /packages/react-docs/src/components/documentation.tsx | |
parent | 6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b (diff) | |
download | dexon-0x-contracts-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.gz dexon-0x-contracts-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.zst dexon-0x-contracts-b74957acdfc8d67d154bcb4698acd7575db7cc47.zip |
Add missing type definitions
Diffstat (limited to 'packages/react-docs/src/components/documentation.tsx')
-rw-r--r-- | packages/react-docs/src/components/documentation.tsx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 0a525f702..25687db67 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -71,19 +71,19 @@ export class Documentation extends React.Component<DocumentationProps, Documenta isHoveringSidebar: false, }; } - public componentDidMount() { + public componentDidMount(): void { window.addEventListener('hashchange', this._onHashChanged.bind(this), false); } - public componentWillUnmount() { + public componentWillUnmount(): void { window.removeEventListener('hashchange', this._onHashChanged.bind(this), false); } - public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) { + public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState): void { if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) { const hash = window.location.hash.slice(1); sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); } } - public render() { + public render(): React.ReactNode { const styles: Styles = { mainContainers: { position: 'absolute', @@ -157,7 +157,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta </div> ); } - private _renderLoading(mainContainersStyles: React.CSSProperties) { + private _renderLoading(mainContainersStyles: React.CSSProperties): React.ReactNode { return ( <div className="col col-12" style={mainContainersStyles}> <div @@ -289,7 +289,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta </div> ); } - private _renderNetworkBadgesIfExists(sectionName: string) { + private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode { if (this.props.docsInfo.type !== SupportedDocJson.Doxity) { return null; } @@ -368,17 +368,17 @@ export class Documentation extends React.Component<DocumentationProps, Documenta /> ); } - private _onSidebarHover(event: React.FormEvent<HTMLInputElement>) { + private _onSidebarHover(event: React.FormEvent<HTMLInputElement>): void { this.setState({ isHoveringSidebar: true, }); } - private _onSidebarHoverOff() { + private _onSidebarHoverOff(): void { this.setState({ isHoveringSidebar: false, }); } - private _onHashChanged(event: any) { + private _onHashChanged(event: any): void { const hash = window.location.hash.slice(1); sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); } |