From bde2a287e1bd910c65761b6838612425815f8f43 Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Wed, 29 Sep 2021 17:58:36 -0600 Subject: [PATCH] GH-1362: Fix missing return type on function (#1375) * fix missing return type errors * fix in userSettings --- webapp/src/components/cardDialog.tsx | 2 +- webapp/src/components/globalHeader/globalHeader.tsx | 2 +- webapp/src/components/table/tableRows.tsx | 2 +- webapp/src/components/viewHeader/viewHeaderSearch.tsx | 2 +- webapp/src/nativeApp.ts | 4 ++-- webapp/src/octoClient.ts | 2 +- webapp/src/pages/boardPage.tsx | 2 +- webapp/src/svg/dashboard-onboarding.tsx | 2 +- webapp/src/svg/search-illustration.tsx | 2 +- webapp/src/userSettings.ts | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/webapp/src/components/cardDialog.tsx b/webapp/src/components/cardDialog.tsx index b32602368..9436bb1ee 100644 --- a/webapp/src/components/cardDialog.tsx +++ b/webapp/src/components/cardDialog.tsx @@ -32,7 +32,7 @@ type Props = { readonly: boolean } -const CardDialog = (props: Props) => { +const CardDialog = (props: Props): JSX.Element => { const {board, activeView, cards, views} = props const card = useAppSelector(getCard(props.cardId)) const contents = useAppSelector(getCardContents(props.cardId)) diff --git a/webapp/src/components/globalHeader/globalHeader.tsx b/webapp/src/components/globalHeader/globalHeader.tsx index 23a1ef1d3..119ab87e3 100644 --- a/webapp/src/components/globalHeader/globalHeader.tsx +++ b/webapp/src/components/globalHeader/globalHeader.tsx @@ -42,7 +42,7 @@ const HeaderItems = () => { ) } -const GlobalHeader = () => { +const GlobalHeader = (): JSX.Element => { return ( diff --git a/webapp/src/components/table/tableRows.tsx b/webapp/src/components/table/tableRows.tsx index 4c76205e0..20d33a38c 100644 --- a/webapp/src/components/table/tableRows.tsx +++ b/webapp/src/components/table/tableRows.tsx @@ -25,7 +25,7 @@ type Props = { onDrop: (srcCard: Card, dstCard: Card) => void } -const TableRows = (props: Props) => { +const TableRows = (props: Props): JSX.Element => { const {board, cards, activeView} = props const {offset, resizingColumn} = useDragLayer((monitor) => { diff --git a/webapp/src/components/viewHeader/viewHeaderSearch.tsx b/webapp/src/components/viewHeader/viewHeaderSearch.tsx index f1cf46882..71149605b 100644 --- a/webapp/src/components/viewHeader/viewHeaderSearch.tsx +++ b/webapp/src/components/viewHeader/viewHeaderSearch.tsx @@ -10,7 +10,7 @@ import Editable from '../../widgets/editable' import {useAppSelector, useAppDispatch} from '../../store/hooks' import {getSearchText, setSearchText} from '../../store/searchText' -const ViewHeaderSearch = () => { +const ViewHeaderSearch = (): JSX.Element => { const searchText = useAppSelector(getSearchText) const dispatch = useAppDispatch() const intl = useIntl() diff --git a/webapp/src/nativeApp.ts b/webapp/src/nativeApp.ts index b15e81e96..04eeb28de 100644 --- a/webapp/src/nativeApp.ts +++ b/webapp/src/nativeApp.ts @@ -9,7 +9,7 @@ declare interface INativeApp { declare const NativeApp: INativeApp -export function importNativeAppSettings() { +export function importNativeAppSettings(): void { if (typeof NativeApp === 'undefined' || !NativeApp.settingsBlob) { return } @@ -19,7 +19,7 @@ export function importNativeAppSettings() { NativeApp.settingsBlob = null } -export function notifySettingsChanged(key: string) { +export function notifySettingsChanged(key: string): void { postWebKitMessage({type: 'didChangeUserSettings', settingsBlob: exportUserSettingsBlob(), key}) } diff --git a/webapp/src/octoClient.ts b/webapp/src/octoClient.ts index 5e3fbddc0..d979a8b58 100644 --- a/webapp/src/octoClient.ts +++ b/webapp/src/octoClient.ts @@ -81,7 +81,7 @@ class OctoClient { return false } - logout() { + logout(): void { localStorage.removeItem('focalboardSessionId') } diff --git a/webapp/src/pages/boardPage.tsx b/webapp/src/pages/boardPage.tsx index 7363a3cc2..f90a3516c 100644 --- a/webapp/src/pages/boardPage.tsx +++ b/webapp/src/pages/boardPage.tsx @@ -34,7 +34,7 @@ type Props = { const websocketTimeoutForBanner = 5000 -const BoardPage = (props: Props) => { +const BoardPage = (props: Props): JSX.Element => { const intl = useIntl() const board = useAppSelector(getCurrentBoard) const activeView = useAppSelector(getCurrentView) diff --git a/webapp/src/svg/dashboard-onboarding.tsx b/webapp/src/svg/dashboard-onboarding.tsx index ef0240be8..3f48a7ac5 100644 --- a/webapp/src/svg/dashboard-onboarding.tsx +++ b/webapp/src/svg/dashboard-onboarding.tsx @@ -3,7 +3,7 @@ import React from 'react' -export default function DashboardOnboardingSvg(props: React.HTMLAttributes) { +export default function DashboardOnboardingSvg(props: React.HTMLAttributes): JSX.Element { return ( ) { +export default function SearchIllustration(props: React.HTMLAttributes): JSX.Element { return (